我正在尝试在 iPhone 上运行以下示例,但出现错误Program received signal SIGBART when installing app on device
。这就是RootViewController
:
#import <UIKit/UIKit.h>
@interface RootViewController : UITableViewController {
}
@end
以及.m
-file中的以下内容
#import "RootViewController.h"
@implementation RootViewController
#pragma mark -
#pragma mark View lifecycle
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
NSDate *date = [NSDate date];
// [...]
}
这是控制台上的错误:
2012-10-07 22:51:25.319 TestLoopPerformance[1790:207] *** -[UIWindow setRootViewController:]: unrecognized selector sent to instance 0x118f40
2012-10-07 22:51:25.336 TestLoopPerformance[1790:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIWindow setRootViewController:]: unrecognized selector sent to instance 0x118f40'
2012-10-07 22:51:25.346 TestLoopPerformance[1790:207] Stack: (
但是,代码在模拟器上运行良好,但在设备上运行良好。可能是什么问题?