TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Suraj.
*** A clone of native app clock ***
NSTimer
to schedule the time, so it won't be blocked by any other UI operations.HH:mm:ss
SPClockView.h
and SPClockView.m
into your projects.SPClockView
into your parent view, set its time zone
by calling setTimeZone:
method.SPDigitalClock
is a subclass of UILabel
, and is implemented inside the SPClockView
class. To set the digital time also call the method setTimeZone:
on SPDigitalClock
.SPClockView
SPClockView *clockView = [[SPClockView alloc] initWithFrame:CGRectMake(0, 0, 140, 140)];
[clockView setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"EDT"]]; // New York
SPDigitalClock
SPDigitalClock *digClock = [[SPClockView alloc] initWithFrame:CGRectMake(0, 0, 140, 140)];
[digClock setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"EDT"]]; // New York
This is a quickly made project so could have few bugs. Feel free to add bug list or contact me at [email protected] or http://www.twitter.com/freesuraj !!