我收到了标题中提到的错误。
这是我的界面:
#import <UIKit/UIKit.h>
@class ControllerLevel1;
@interface RootController : UIViewController {
ControllerLevel1 *controllerLevel1;
}
@property (retain, nonatomic) ControllerLevel1 *controllerLevel1;
@end
这是实施:
#import "RootController.h"
#import "ControllerLevel1.h"
@implementation RootController
@synthesize controllerLevel1;
- (void)viewDidLoad {
ControllerLevel1 *firstLevel = [[ControllerLevel1 alloc]initWithNibName:@"ControllerLevel1" bundle:nil];
self.controllerLevel1 = firstLevel;
[self.view insertSubview:firstLevel.view atIndex:0];
[firstLevel release];
[super viewDidLoad];
}
错误发生在[self.view insertSubview:firstLevel.view atIndex:0];
答案 0 :(得分:0)
它抱怨firstLevel.view。
因此,您可能没有将“view”声明为ControllerLevel1.h中的属性。向我们展示.h文件,我们可以提供更多帮助。