Wednesday, 16 May 2012

How to call a static / class methods using selectors

[MyClassName thisIsStaticMethod:@"Hello"];

Above static / class  method can be called from selector in this way ->

[NSTimer scheduledTimerWithTimeInterval:1.0f
                                             target:[MyClassName class]
                                           selector:@selector(thisIsStaticMethod:)
                                           userInfo:@"Hello"
                                            repeats:NO];


No comments:

Post a Comment