- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
HeadViewController *headViewController = [[HeadViewController alloc] initWithNibName:@"HeadViewController" bundle:nil];
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 120)];
[view addSubview:headViewController.vew];
[self.view addSubview:view];
}
HeadViewController.h:
@interface HeadViewController : UIViewController
{
IBOutlet UIView *view;
}
@property (nonatomic, retain)IBOutlet UIView *view;
@end
我将视图连接到文件的所有者。
但我看不到 headViewController.view
。