Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
54f2aea
Created TabBarController
Diana71 Aug 21, 2015
ce16cbd
First Commit
Ericfsod Aug 21, 2015
ad5d284
classes
Diana71 Aug 21, 2015
affbc01
Created basic stuff
Diana71 Aug 22, 2015
302d8eb
Added 2 files
Diana71 Aug 22, 2015
e306ec3
Added Start/Reset/Stop/Lap buttons
Diana71 Aug 22, 2015
22ee8b7
Start/Stop buttons work
Diana71 Aug 22, 2015
6b20931
fixed some bugs
Diana71 Aug 22, 2015
aa10810
Reset Button Done
Diana71 Aug 22, 2015
f2dbeec
Yeahhhhh! Just split the time into minutes, seconds and fractions
Diana71 Aug 22, 2015
1c40c63
Cleaned some stuff
Diana71 Aug 22, 2015
e78b8e9
Got the recent lap label working
Diana71 Aug 22, 2015
c6728c5
Created UI
Ericfsod Aug 22, 2015
7887c19
push commit
Ericfsod Aug 22, 2015
a76a61a
sigh
Ericfsod Aug 22, 2015
365b338
Added some stuff
Diana71 Aug 22, 2015
64307a2
new
Diana71 Aug 22, 2015
4564365
new
Ericfsod Aug 22, 2015
742d11b
working on stop button
Diana71 Aug 22, 2015
54b9852
Added icons
Diana71 Aug 23, 2015
751b8b0
Should fix Reset function
Diana71 Aug 23, 2015
2dae69f
Reset button done
Diana71 Aug 23, 2015
a3c4fda
Working on Lap Array
Diana71 Aug 23, 2015
d9bdc5a
Lap Done
Diana71 Aug 23, 2015
13f5dea
Added font type
Diana71 Aug 23, 2015
3562dd9
Added clock sound
Diana71 Aug 23, 2015
2d1525e
grr
Ericfsod Aug 23, 2015
6e14b2a
Started working on Timer
Diana71 Aug 23, 2015
4606fae
Added tracks
Diana71 Aug 23, 2015
06e3c23
Timer stuff
Diana71 Aug 23, 2015
9f4bc83
Fixed Stopwatch bugs
Diana71 Aug 24, 2015
ab2414c
Reversed Laps done
Diana71 Aug 24, 2015
15e54e8
Time Label fixed
Diana71 Aug 24, 2015
25d1bfa
Fixed minutes bug. Now it's working!
Diana71 Aug 24, 2015
5667b2a
Added some stuff
Diana71 Aug 24, 2015
a0a9874
timer counts down, start/stop button works
Ericfsod Aug 26, 2015
1ab5868
New UI
Diana71 Aug 26, 2015
13c1cfd
Reorganized Stopwatch
Diana71 Aug 26, 2015
f0680eb
Started working on World Clock
Diana71 Aug 26, 2015
52ae6eb
Update Stopwatch UI
Diana71 Aug 26, 2015
b32ea0f
WorldClock basic stuff
Diana71 Aug 27, 2015
8ec651d
WorldClock Edit and delete function
Diana71 Aug 27, 2015
dbc2267
Added Add button
Diana71 Aug 27, 2015
03c510c
Added Countdown
Diana71 Aug 28, 2015
071fb7d
i forgot to add these
Diana71 Aug 29, 2015
a898c14
organization and popcorn button
Ericfsod Aug 29, 2015
e08c33d
pause timer working
Ericfsod Aug 29, 2015
1a7176d
new files
Diana71 Aug 29, 2015
14641ab
Merge branch 'master' of https://github.com/Diana71/unit-1-final-project
Diana71 Aug 29, 2015
0a0a599
reorganized WorldClock
Diana71 Aug 29, 2015
72565dd
Got current time in the computer
Diana71 Aug 29, 2015
7ec4c1c
Got world cities current time
Diana71 Aug 29, 2015
8fddfb4
WorldClock is WORKINGGGG
Diana71 Aug 29, 2015
8133e9f
Pause, Stop, Reset, Resume added, presets in progress
Ericfsod Aug 29, 2015
72833f3
Once more, with feeling
Ericfsod Aug 29, 2015
ebab9d6
Search bar added
Diana71 Aug 30, 2015
b596092
merge
Diana71 Aug 30, 2015
8ef51eb
Search bar selects cities by user input
Diana71 Aug 30, 2015
6c5d191
I just did something AMAZINGGGls :D
Diana71 Aug 30, 2015
27a8322
Changed tableView background
Diana71 Aug 31, 2015
ac49c83
Added Mute Button
Diana71 Aug 31, 2015
275c395
Added more sounds
Diana71 Aug 31, 2015
5c0fabd
Sorted world cities A-Z
Diana71 Aug 31, 2015
267c458
Added preset view controller and preset stopwatch
Diana71 Aug 31, 2015
f8292dd
added cities
Ericfsod Sep 1, 2015
d4b13f7
Added Presets
Diana71 Sep 1, 2015
37db212
Updated UI
Diana71 Sep 1, 2015
542517e
Loading Progress added !
Diana71 Sep 1, 2015
1ba44fc
Progress is fixed
Diana71 Sep 1, 2015
6a4efbd
Countdown fixed
Diana71 Sep 1, 2015
1519458
Working on progressView Label
Diana71 Sep 1, 2015
d5291b8
Added stuff
Diana71 Sep 1, 2015
a272bb7
more changes
Diana71 Sep 1, 2015
9615775
reorganizing items
Diana71 Sep 2, 2015
9c82acf
Fixed Countdown time
Diana71 Sep 2, 2015
b14b881
user can't select a past date
Diana71 Sep 2, 2015
d9a4892
Added animation
Diana71 Sep 3, 2015
e5c8dbe
fixed some mispelled words
Ericfsod Sep 3, 2015
81ecd6d
latest changes
Diana71 Sep 4, 2015
b4f8054
latest changes
Diana71 Sep 4, 2015
7461a8f
latest changes
Diana71 Sep 4, 2015
c9810a6
Changed something on Storyboard
Diana71 Sep 4, 2015
80c8c1b
Still working on Presets
Diana71 Sep 12, 2015
807542c
Cleaned up code
Diana71 Sep 23, 2015
0935cd5
Fixed a bug
Diana71 Oct 1, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 160 additions & 18 deletions Time/Time.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file added Time/Time/991.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Time/Time/992.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Time/Time/993.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Time/Time/994.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions Time/Time/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
//

#import <UIKit/UIKit.h>

@class CountdownEventViewController;
@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

//@property (strong, nonatomic) UIWindow *window;

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet CountdownEventViewController *viewController;
@end

7 changes: 6 additions & 1 deletion Time/Time/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,21 @@
//

#import "AppDelegate.h"
#import "CountdownEventViewController.h"

@interface AppDelegate ()

@end

@implementation AppDelegate

@synthesize window;
@synthesize viewController;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[self.window addSubview:viewController.view];
[self.window makeKeyAndVisible];

return YES;
}

Expand Down
25 changes: 0 additions & 25 deletions Time/Time/Base.lproj/Main.storyboard

This file was deleted.

Binary file added Time/Time/Clock-Ticking(1minute).mp3
Binary file not shown.
14 changes: 14 additions & 0 deletions Time/Time/CountdownEventViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// CountdownEventViewController.h
// Time
//
// Created by Diana Elezaj on 8/27/15.
// Copyright (c) 2015 Mike Kavouras. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface CountdownEventViewController : UIViewController

@property(nonatomic,retain)IBOutlet UIImageView *sandGlass;
@end
165 changes: 165 additions & 0 deletions Time/Time/CountdownEventViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
//
// CountdownEventViewController.m
// Time
//
// Created by Diana Elezaj on 8/27/15.
// Copyright (c) 2015 Mike Kavouras. All rights reserved.
//

#import "CountdownEventViewController.h"

@interface CountdownEventViewController ()
@property (nonatomic) NSTimer *countdownTimer;
@property (weak, nonatomic) IBOutlet UIDatePicker *eventPicker;
@property (weak, nonatomic) IBOutlet UILabel *countdownTimerLabel;
@property (weak, nonatomic) IBOutlet UILabel *eventLabel;
@property (weak, nonatomic) IBOutlet UITextField *eventTextField;
- (IBAction)startButton:(id)sender;
- (IBAction)stopButton:(id)sender;
@property (strong, nonatomic) IBOutlet UILabel *DaysHMS;
@property (strong, nonatomic) IBOutlet UIImageView *eventImage;

@end

@implementation CountdownEventViewController
- (void)viewDidLoad {
[super viewDidLoad];


NSArray *imgArray = [NSArray arrayWithObjects:
[UIImage imageNamed:@"991"],
[UIImage imageNamed:@"992"],
[UIImage imageNamed:@"993"],
[UIImage imageNamed:@"994"],nil];

self.sandGlass.frame = CGRectMake(0, 0, 200, 200);
self.sandGlass.animationImages = imgArray;
self.sandGlass.animationDuration = 2;
self.sandGlass.animationRepeatCount = 0;

[self.sandGlass startAnimating];

[self.view insertSubview:self.sandGlass atIndex:0];


self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"waterRotated"]];

self.eventLabel.hidden = YES;
self.countdownTimerLabel.hidden = YES;
self.DaysHMS.hidden = YES;
self.countdownTimerLabel.text = @"";
self.eventLabel.text = @"";
self.eventImage.hidden = YES;

NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
NSDate *currentDate = [NSDate date];

NSDateComponents *dateLimit = [[NSDateComponents alloc] init];

[dateLimit setDay:0];
[dateLimit setHour:0];
[dateLimit setMinute:0];
NSDate *minimumDate = [calendar dateByAddingComponents:dateLimit toDate:currentDate options:0];

[self.eventPicker setMinimumDate:minimumDate];

}

- (IBAction)startButton:(id)sender {

//this will create animation for eventLabel
CATransition *animation = [CATransition animation];
animation.duration = 1.0;
animation.type = kCATransitionFromTop;
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
[self.eventLabel.layer addAnimation:animation forKey:@"changeTextTransition"];

/***** interface ***/
self.countdownTimerLabel.hidden = NO;
self.eventTextField.hidden = YES;

self.countdownTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
target:self
selector:@selector(updateTime)
userInfo:nil
repeats:YES];
if ([self.countdownTimerLabel.text isEqualToString:@"This date has already passed"]) {
}
else {

self.eventImage.hidden = NO;
self.eventLabel.hidden = NO;
}


NSString *stringEvent = [self.eventTextField text];
if (([stringEvent rangeOfString:@"Wedding"].location != NSNotFound) || ([stringEvent rangeOfString:@"wedding"].location != NSNotFound)) {
self.eventImage.image = [UIImage imageNamed:@"wedding"];
NSLog(@"There is a weddin comming up");
} else if (([stringEvent rangeOfString:@"Graduation"].location != NSNotFound) || ([stringEvent rangeOfString:@"graduation"].location != NSNotFound)) {
self.eventImage.image = [UIImage imageNamed:@"graduation"];
}

else if (([stringEvent rangeOfString:@"Halloween"].location != NSNotFound) || ([stringEvent rangeOfString:@"halloween"].location != NSNotFound)) {
self.eventImage.image = [UIImage imageNamed:@"halloween"];
}

else
{
NSLog(@"no weddings!");
}

if ([[self.eventTextField text] isEqual: @""])
self.eventLabel.text = [NSString stringWithFormat: @"Time remaining until your event"];
else
self.eventLabel.text = [NSString stringWithFormat: @"Time remaining until \"%@\"", [self.eventTextField text]];



//get current time on your computer/phone
NSCalendar *calendar = [NSCalendar autoupdatingCurrentCalendar];

NSUInteger preservedComponents = (NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay);
self.eventPicker.date = [calendar dateFromComponents:[calendar components:preservedComponents fromDate:self.eventPicker.date]];

}

- (IBAction)stopButton:(id)sender {
[self.countdownTimer invalidate]; //invalidate timer
self.eventTextField.hidden = NO;
self.eventImage.hidden = YES;
}

-(void)updateTime
{
NSInteger timeLeft, days, hours, minutes, seconds ;

timeLeft = ((NSInteger)[self.eventPicker.date timeIntervalSinceNow]);

days = (timeLeft / 86400) ;
timeLeft-= days * 86400;
NSLog (@"days %02li ",days);


hours = (timeLeft / 3600) ;
timeLeft -= hours * 3600;
NSLog (@"hours %02li ",hours);

minutes = (timeLeft / 60) ;
timeLeft -= minutes * 60;
NSLog (@"minutes %02li ",minutes);

seconds = timeLeft;
NSLog (@"seconds %02li ",seconds);


self.DaysHMS.hidden = NO;
self.countdownTimerLabel.textColor = [UIColor blackColor];
self.countdownTimerLabel.text = [NSString stringWithFormat:@"%02li %02li %02li %02li", (long)days, (long)hours, (long)minutes, (long)seconds];
}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}

@end
40 changes: 40 additions & 0 deletions Time/Time/DIGITAL.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
DS-Font's TrueType Fonts
Font name: DS-Digital (Normal, Bold, Italic, Bold Italic), Version 1.0
Author: Dusit Supasawat
Web Site: http://ds-font.hypermart.net
Contact me: Dusit Supasawat, 325/38 Suksawat32 Ratburana Bangkok Thailand 10140
Email address: dusit@mailcity.com

Thanks for trying! We hope you really enjoy this my typeface. This font is
distributed as shareware. You can use this font for a long time as you want.
After all, when you think this font can be usefulness for you. You can send
me some money, that would be way cool.

I'm only asking $20 US shareware fee per this typeface for personal use.
And $45 US is the usual amount per this typeface for commercial use.

Distribution: You are free to distribute this archive so long as this text
file is distributed with the archive, the font file have not been modified,
and it is understood that the font's copyright remains with the original
author (Dusit Supasawat).

To register send your payment to:

Dusit Supasawat
325/38 Suksawat32 Ratburana
Bangkok Thailand 10140

And fill out something as this order form, and send it in with your payment.

Font name:_________________________________________
Your information
Name:______________________________________________
Address:___________________________________________
City, State : _____________________________________
Zip Code:__________________________________________
Country:___________________________________________
E-MAIL address:____________________________________


You will receive fonts which you order by Email after registration. These fonts
will be generated for you by specify your name in font information.
Binary file added Time/Time/DS-DIGI.TTF
Binary file not shown.
Binary file added Time/Time/DS-DIGIB.TTF
Binary file not shown.
Binary file added Time/Time/DS-DIGII.TTF
Binary file not shown.
Binary file added Time/Time/DS-DIGIT.TTF
Binary file not shown.
Binary file added Time/Time/Images.xcassets/007.imageset/007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions Time/Time/Images.xcassets/007.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "007.png"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added Time/Time/Images.xcassets/008.imageset/008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions Time/Time/Images.xcassets/008.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "008.png"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added Time/Time/Images.xcassets/08.imageset/08.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions Time/Time/Images.xcassets/08.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "08.png"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added Time/Time/Images.xcassets/09.imageset/09.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions Time/Time/Images.xcassets/09.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "09.png"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added Time/Time/Images.xcassets/111.imageset/111.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading