Call button function. You can also manually call the function yourself.
Example:
- (void) btnFunction {
NSLog (@"test");
}
...
UIButton *btn1 = [UIButton buttonWithType:UIButtonRoundedRect];
[btn1 addTarget:self action:@selector(btnFunction) forControlEvents:UIControlEventTouchUpInside];
You can also call the function yourself:
[self btnFunction]
source
share