キャンセルボタンが押されたときに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のビューを変更するためにこのメソッドを使用できないと私に言いました、それで私は何を使うべきですか?