开发者

How to use performselector to involve the function with argument after particular time period

I am new to this iPhone app programming. I have a function with one argument type as structure pointer. This is shown below

(void)responce:(structurePtr *)someData
{
......
......
}

I want to call this function using performselector method after 5 seconds of time interval. Please tell me how to call above responce 开发者_StackOverflow中文版function using performselector

Thanks in advance.


Use: - (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay

[yourObject performSelector:@selector(responce:) withObject:someData afterDelay:5];

Note: it is not guaranteed that your selector will be performed exactly after 5 seconds - it just specifies the minimum time before the message is sent to your object.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜