Sorry for the unclear title. I want to be able to add IBAction methods to a button I added in the following way:
(.h class)
{
UIButton *button;
}
-(IBAction)ButtonReleased:(id)sender
(.m class)
{
-(IBAction)ButtonReleased:(id)sender
{
//Actions done by button pointer
}
- (void)viewDidLoad
{
[super viewDidLoad];
[PlayButton setFrame:CGRectMake(10, 10, 100, 50)];
[PlayButton setTitle:@"PlayButton" forState:UIControlStateNormal];
[self.view addSubview:PlayButton];
}
}
The question is, how can I connect the UIButton button action (say, TouchUpInside) to the ButtonReleased method.