*** 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
NSTimerto 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.handSPClockView.minto your projects. - After adding the
SPClockViewinto your parent view, set itstime zoneby callingsetTimeZone:method. - Digital clock
SPDigitalClockis a subclass ofUILabel, and is implemented inside theSPClockViewclass. To set the digital time also call the methodsetTimeZone:onSPDigitalClock.
-
SPClockViewSPClockView *clockView = [[SPClockView alloc] initWithFrame:CGRectMake(0, 0, 140, 140)]; [clockView setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"EDT"]]; // New York -
SPDigitalClockSPDigitalClock *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 !!