How can I create a basic UIButton programmatically? For example in my view controller, when executing the viewDidLoad method, three UIButton<
UIButton
viewDidLoad
UIButton<
'action:@selector(aMethod:)' write method like this :
'action:@selector(aMethod:)'
- (void)aMethod:(UIButton*)button { NSLog(@"Button clicked."); }
It works for me. Thanks. KS.