Method invocation with timer – even easier

Featured Image

In my last post I written how to code an method invocation with timer. Since then I’ve found yet even easier way to achieve that. All this updating post’s work is part of growing up with the iPhone development, so don’t be surprised if I add something one more time to the same post. Well, that’s why there is same image for this and last post. :-) See code below and all will be clear.

- (void) viewDidLoad {

[NSTimer scheduledTimerWithTimeInterval:3.0f target:self selector: @selector(myMethod) userInfo:nil repeats:YES];

[super viewDidLoad];

}

- (void) myMethod {

NSLog(@"Method execution");

}

And that is it. Again!

0
Top

Enjoyed this post?

Subscribe to our RSS Feed, Follow us on Twitter and spread it to your friends!

Author

Ivan Kalaica

Senior OSX and iOS SDK Developer

At Inchoo, Ivan Kalaica is a Senior OSX and iOS SDK developer.

Other posts from this author

Discussion 0 Comments

Add Comment

Add Your Comment

Please wrap all source codes with [code][/code] tags.
Top