addSubview 显示黑屏,没有内容 - iPhone
当我加载 xib: AboutViewController 作为视图 contentView 的子视图时,我只是得到一个空白的黑屏,有人可以帮忙吗?
UIView* moreView = [[[NSBundle mainBundle] loadNibNamed:@"AboutViewController" owner:self options:nil] lastObject];
[_revealView.contentView addSubview:moreView];
When I load my xib: AboutViewController as a subview of the view contentView, I just get a blank black screen, can someone help??
UIView* moreView = [[[NSBundle mainBundle] loadNibNamed:@"AboutViewController" owner:self options:nil] lastObject];
[_revealView.contentView addSubview:moreView];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该使用视图控制器,然后只访问视图控制器的视图:
或者,您可能有兴趣以模态方式呈现视图:
如果您不使用 ARC,则必须手动管理
aboutVC
与保留和释放。You should use view controllers instead, then just access the view of the view controller:
Alternatively, you may be interested in presenting the view modally:
If you are not using ARC, you will have to manage
aboutVC
manually with retain and release.