我有按钮:如何阅读IBAction中的按钮标签?
...
UIButton* rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
[rightButton setTitle:annotation.title forState:UIControlStateNormal];
rightButton.tag = myCustomNumber;
[rightButton addTarget:self action:@selector(showDetails:) forControlEvents:UIControlEventTouchUpInside];
...
这里是IBAction为:
..
-(IBAction)showDetails:(id)sender{
// here I want to NSLOG button tag
}
...
如何做到这一点?