0
我有一个按钮在我的ProfileView视图控制器笔尖调用时按下我去显示OptionsView视图控制器。笔尖导航线程1:信号SIGABRT
在我ProfileView.m文件我这是viewDidLoad中:
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Options" style:UIBarButtonItemStylePlain target:self action:@selector(actionOptions)];
,然后我有:
- (void)actionOptions
{
OptionsView *screen = [[OptionsView alloc] initWithNibName:@"OptionsView" bundle:Nil];
[self.view addSubview:screen.view];
}
但每当我点击按钮,我得到一个线程1:信号SIGABRT与以下控制台输出:
2014-11-24 13:43:54.107 app[2161:5537921] didFailToRegisterForRemoteNotificationsWithError Error Domain=NSCocoaErrorDomain Code=3010 "remote notifications are not supported in the simulator" UserInfo=0x7ff7c2c365d0 {NSLocalizedDescription=remote notifications are not supported in the simulator}
2014-11-24 13:43:55.673 app[2161:5537921] *** Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/UITableView.m:7344
2014-11-24 13:43:55.676 app[2161:5537921] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'
为什么你不能只将按钮链接到笔尖的IBAction? – 2014-11-24 18:50:34
当我这样做时,我得到同样的错误 – 2014-11-24 18:58:03
您的问题似乎与您发布的代码没有任何关系。你读过你发布的控制台输出了吗? – stromdotcom 2014-11-24 19:04:19