views:

89

answers:

1

Hi,

I am new to this i phone 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 function using performselector

thanx in advance

+2  A: 

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.

Vladimir