-
-
Save codingwithsara/2558f827589d183bc010242d78198520 to your computer and use it in GitHub Desktop.
[ iOS ] How to create a Stopwatch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.h | |
// stopwatch | |
// | |
#import <UIKit/UIKit.h> | |
@interface ViewController : UIViewController | |
{ | |
NSTimer *myTimer; | |
BOOL running; | |
int count; | |
} | |
@property (weak, nonatomic) IBOutlet UILabel *timerLabel; | |
@property (weak, nonatomic) IBOutlet UIButton *startBtn; | |
@property (weak, nonatomic) IBOutlet UIButton *resetBtn; | |
- (IBAction)startBtnPushed:(id)sender; | |
- (IBAction)resetBtnPushed:(id)sender; | |
- (void)updateTimer; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment