There are many different callbacks method signatures in iOS. Most of the time programmers may not recall all of them when they come to use.
Here I provide a check list of different call backs. Will add incrementally.
<GestureRecognizer>
UITapGestureRecognizer* gest_0 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap_view)];
[control_0 addGestureRecognizer:gest_0];
- (void)tap_view:(UITapGestureRecognizer*)recognizer{
UIButton* btn_sender = (UIButton*)[recognizer view];
}
<NSTimer>
[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(timer_callback:) userInfo:button repeats:FALSE];
-(void) timer_callback:(id)user_info{
UIButton* btn_0 = (UIButton*)user_info;
}
<Multi-Threading>
[NSThread detachNewThreadSelector:@selector(threaded_function:) toTarget:self withObject:button];
-(void) threaded_function:(id) param{
UIButton* btn_0 = (UIButton*)user_info;
}