A few options here.
If you just need a 2 second delay, you can use the sleep () function
#include<unistd.h>
...
sleep(2);
Or you can use NSTimer so
[NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(fireMethod) userInfo:nil repeats:NO];
And in your class, you will have a method defined as
-(void)fireMethod
{
}
source
share