我在菜单中有一个按钮,当它被触摸时,弹出一个带有两个按钮“Cancel
”和“Yes
”的警报消息。这是我对警报代码:iOS alertview操作按钮
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Exit game"
message:@"Are you sure?"
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Yes", nil];
[alert show];
是否可以添加到按钮“Yes
”的行动?
如果你有多个UIAlertViews,你应该设置标签来描述哪一个被调用。 –