【发布时间】:2013-07-17 19:37:41
【问题描述】:
我为一个动作创建了一个UIAlertView,它给了我两个选项。我希望用户能够单击一个按钮并让它执行 Segue。
这是我目前的代码:
- (IBAction)switchView:(id)sender
{
UIAlertView *myAlert = [[UIAlertView alloc]
initWithTitle:@"Please Note"
message:@"Hello this is my message"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:@"Option 1", @"Option 2", nil];
[myAlert show];
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
NSString *buttonTitle = [alertView buttonTitleAtIndex:buttonIndex];
if ([buttonTitle isEqualToString:@"Option 1"]) {
}
}
【问题讨论】:
-
这个问题你解决了吗?
标签: ios uialertview uistoryboard segue uistoryboardsegue