私はiOS開発の初心者です。UINavigationController を使用して、あるビューから別のビューに移動したい。可能かどうか教えてください。可能であれば、どのように??
2 に答える
1
この次のコードを試してください:
SecondVC *detailView = [[SecondVC alloc] initWithNibName:@"SecondVC" bundle:nil];
[self.navigationController pushViewController:detailView animated:YES];
[detailView release];
于 2013-10-11T08:24:27.873 に答える
0
次の方法を使用します。
.h ファイル
#import "SecondViewController.h"
.m ファイル
- (IBAction)gotoSecondView:(id) sender
{
NSLog(@"I am going to Second View");
SecondViewController *SecondView = [[SecondViewController alloc]initWithNibName:@"SecondViewController" bundle:nil];
[self.navigationController pushViewController:SecondView animated:YES];
[SecondView release];
}
絵コンテの場合:
SecondViewController* SecondView = [self.storyboard instantiateViewControllerWithIdentifier:@"SecondViewController"];
[self presentModalViewController:SecondView animated:YES];
于 2013-10-11T08:24:54.650 に答える