按下取消按钮时如何使用 UIActionSheet 切换视图?
xcode 4.3.2
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
NSString *buttonTitle = [actionSheet buttonTitleAtIndex:buttonIndex];
if ([buttonTitle isEqualToString:@"Done"]) {
thiredViewController *controller1 = [[thiredViewController alloc] initWithNibName:@"thiredViewController" bundle:nil];
[self presentModalViewController:controller1 animated:NO];
}
}
这段代码什么都不做,视图没有改变,我朋友告诉我,我不能用这个方法在新的 Xcode 中改变视图,那我应该用什么?