- (IBAction)buttonPressed:(id)sender
{
[NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(timerExpired) userInfo:nil repeats:NO];
}
- (void)timerExpired
{
NSLog(@"Your two seconds are up!");
}
More Related Contents:
- How to detect iPhone 5 (widescreen devices)?
- How can I animate the movement of a view or image along a curved path?
- Black bars showing when running app on iOS 7 (4 inch retina display)
- How can I do Key Value Observing and get a KVO callback on a UIView’s frame?
- library not found for -lPods
- iOS SDK – Programmatically generate a PDF file
- What are best practices that you use when writing Objective-C and Cocoa? [closed]
- Detecting when the ‘back’ button is pressed on a navbar
- How do I accept a self-signed SSL certificate using iOS 7’s NSURLSession and its family of delegate methods for development purposes?
- UILabel updating stops during scrolling UIScrollView
- UIButton not showing highlight on tap in iOS7
- Dismissing a Presented View Controller
- How to make a call programmatically?
- Streaming mp3 audio with AVPlayer
- Detect carrier connection type (3G / EDGE / GPRS)
- How Do I write a Timer in Objective-C?
- How to cache content in UIWebView for faster loading later on?
- post image to server in iphone
- iphone app allow background music to continue to play
- Weak and strong property setter attributes in Objective-C
- iOS Low Memory Crash, but very low memory usage
- iOS save photo in an app specific album
- Byte Array to NSData
- UIBarButtonItem: target-action not working?
- Black screen instead of launch image on iPad
- Why do weak NSString properties not get released in iOS?
- Screen size of iPhone 5
- How to use iOS Reachability
- How can I cancel an asynchronous call through NSURLConnection sendAsynchronousRequest?
- What is __NSArrayI and __NSArrayM? How to convert to NSArray?