【发布时间】:2011-02-07 07:45:06
【问题描述】:
我收到以下错误,我不确定是什么原因造成的。
2011-02-06 23:38:12.580 SApp[9648:207] -[Record superview]: unrecognized selector sent to instance 0x5f2a350
2011-02-06 23:38:12.583 SApp[9648:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Record superview]: unrecognized selector sent to instance 0x5f2a350'
产生错误的步骤:
- 我的自定义类被添加到 应用委托的窗口。
- 我的类是 UIViewController 的子类。
- 在我的自定义类中,我添加了一个子视图(记录),这是另一个 UIViewController 的子类。 - 这 是错误开始发生的时间。
导致错误的代码:
[self.view addSubview:[self.tabBarControllers objectAtIndex:0]];
我的所有 .h 文件都包含在它们应该在的位置,所以我不确定是什么原因造成的。和想法?
【问题讨论】:
标签: iphone ios uiview uiviewcontroller