
Hi,
How to add selector to perform something when UIButton is clicked?
Thanks

Hi,
Use the following code to add selector method:
[button addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
and use following code to capture button click:
- (IBAction)buttonClicked:(id)sender
{
NSLog(@"Button clicked");
}
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.