从 NIB 加载 NSView 不起作用
我有这段代码从 NIB 加载 NSView 并将其添加到另一个 NSView:
// INIT
- (void)awakeFromNib {
// Load nib
DNListViewController *listViewController = [[DNListViewController alloc] initWithNibName:@"ListView" bundle:nil];
// Add view to window
[listViewController.view setFrame:detailView.frame];
[detailView addSubview:listViewController.view];
// MEM
[listViewController release];
}
所有插座都连接正确,但没有显示任何内容。我不明白为什么!有人可以帮助我吗?谢谢。
这是关于 NSViews,而不是 UIViews!
I have this code to load an NSView from a NIB and add it to another NSView:
// INIT
- (void)awakeFromNib {
// Load nib
DNListViewController *listViewController = [[DNListViewController alloc] initWithNibName:@"ListView" bundle:nil];
// Add view to window
[listViewController.view setFrame:detailView.frame];
[detailView addSubview:listViewController.view];
// MEM
[listViewController release];
}
All outlets are connected right, but nothing shows up. I don't understand why! Can someone help me? Thanks.
This is about NSViews, not UIViews!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
哦,我已经修好了。没关系,我会让我们为未来的人们留在这里。
必须是
Oh, I fixed it already. Nevermind, I'll let is stay here for people from the future.
must be