- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
self.rootVC = [[VZMConversationViewController alloc] initWithNibName:@"VZMConversationViewController" bundle:[NSBundle mainBundle]];
[self.window.contentView addSubview:self.rootVC.view];
self.rootVC.view.frame = ((NSView*)self.window.contentView).bounds;
/*
[NSLayoutConstraint constraintWithItem:self.rootVC.view attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.window.contentView attribute:NSLayoutAttributeWidth multiplier:1 constant:0];
[NSLayoutConstraint constraintWithItem:self.rootVC.view attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:self.window.contentView attribute:NSLayoutAttributeHeight multiplier:1 constant:0];
//above 2 lines are not working
*/
}
嘿,我是一名试图了解 mac 开发的 iPhone 开发人员,我有上面的代码以及如何向第一个视图控制器视图添加约束,以便控制器视图随窗口调整大小。这可以在 XIB 中完成吗?