【发布时间】:2026-01-29 10:15:01
【问题描述】:
我有大约三个 xib 文件,a b c b上有一个按钮,点击它会显示警报,代码是
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Warning"
message:@"You will jump to a when you click 'Yes,Go',or click 'No,I am not' for exit"
delegate:nil
cancelButtonTitle:@"Yes,Go"
cancelButtonTitle:@"No,I am not"
otherButtonTitles:nil];
[alert show];
[alert release];
正如它的描述,当我点击'Yes,Go'时我想跳转到a,如果我点击'No,I am not',这个应用程序将被关闭
那该怎么办呢?
谢谢
【问题讨论】:
-
你为什么要写两次cancelButtonTitle?
标签: iphone objective-c ios uibutton uialertview