*** A clone of native app clock ***
![SPClockView 1] (https://dl.dropboxusercontent.com/u/4280704/publicPhotos/spclockView.png)
###Features
- Can set the time zone or choose from a list of time zone
- Automatically detects the day or night and changes the background of the clock
- Doesn't use
NSTimer
to schedule the time, so it won't be blocked by any other UI operations. - Swipe to delete the added clock
- Displays the name of the timezone and time in digital format
- Digital clock to display the name in format:
HH:mm:ss
Pod 'SPClockView'
- Import the files
SPClockView.h
andSPClockView.m
into your projects. - After adding the
SPClockView
into your parent view, set itstime zone
by callingsetTimeZone:
method. - Digital clock
SPDigitalClock
is a subclass ofUILabel
, and is implemented inside theSPClockView
class. To set the digital time also call the methodsetTimeZone:
onSPDigitalClock
.
-
SPClockView
SPClockView *clockView = [[SPClockView alloc] initWithFrame:CGRectMake(0, 0, 140, 140)]; [clockView setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"EDT"]]; // New York
-
SPDigitalClock
SPDigitalClock *digClock = [[SPDigitalClock 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 !!