I have the following code, and when i press the UIButton, nothing is called, and it doesn't crash.
calloutButton = [[UIView alloc] initWithFrame:CGRectMake(left_width2*2-3, 5, 230, 230)];
UIButton *buttongo= [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
buttongo.frame=CGRectMake(0, -1, 25, 25);
[buttongo addTarget:self action:@selector(buttonEvent:) forControlEvents:UIControlEventTouchUpInside];
[calloutButton addSubview:buttongo];
[label addSubview:calloutButton];
-(IBAction)buttonEvent:(id)sender
{
NSLog(@"Hello...");
}
Someone Knows why?
Thanks!