【发布时间】:2014-07-16 05:36:58
【问题描述】:
如果 UIButton 有任何标记值,我需要一个操作。
如果它没有标签值需要采取另一个行动。
我尝试过关注,但它崩溃了。
-(void)buttonClick:(id)sender {
NSInteger t = [sender tag]; //crashing here if it has no tag value
if(t) {
//action
} else {
//another action
}
}
【问题讨论】:
-
什么是崩溃信息?
标签: ios objective-c uibutton