objective c - Can I perform a class method after a delay? -


i'm inside class method, , want trigger class method, same class, after delay. doesn't appear can use

[myclass performselector:@selector(mymethod) withobject:nil afterdelay:1] 

any other options?

edited:

my bad. assumed call wasn't available within class method, because wasn't auto-completing wrote it. couple of people have pointed out here, works fine. not sure why didn't autocomplete in case, learned lesson making assumptions when happens. everyone.

you use -class actual reference class , message so:

[[myclass class] performselector:@selector(myclassmethod) withobject:nil afterdelay:1.0]; 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -