我刚刚在xcode 4.2中使用模板实用程序应用程序创建了一个新项目。这是我的项目层次:MainViewController(storyboard)无法推送我的UITableViewController
然后,我试图推动的UITableViewController没有XIB文件(Batikla:的UITableViewController)从MainViewController。 首先,我把一个按钮在我MainViewController故事板并将其连接到我的IBAction为方法:
@implementation MainViewController
@synthesize managedObjectContext = _managedObjectContext;
@synthesize flipsidePopoverController = _flipsidePopoverController;
- (IBAction)batikla{
NSLog(@"test 1");
Batikla *batikla = [[Batikla alloc] initWithStyle:UITableViewStylePlain];
batikla.title = [NSString stringWithFormat:@"Test"];
[self.navigationController pushViewController:batikla animated:YES];
[batikla release];
NSLog(@"test 2");
}
轻点按钮没有视图后推到视图,而不是出现在控制台:
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".Attaching to process 58916.
2012-01-17 01:30:47.569 iBadah[58916:207] test 1
2012-01-17 01:30:47.572 iBadah[58916:207] test 2
该方法被解雇,但为什么我的uitableviewcontroller没有被推入屏幕?
如何将导航控制器放入故事板?我去编辑 - >嵌入 - >导航控制器然后运行它,我得到这样的错误:[UINavigationController setManagedObjectContext:]:无法识别的选择发送到实例0x6a20820。我在这里错过了什么? – dejoong 2012-01-17 00:46:48