UIPopoverController,如何设置popover的背景?
UIPopoverController,如何设置popover的背景?
[[[self.popoverController contentViewController] view] setBackgroundColor:[UIColor blueColor]];
这不起作用(( 弹出窗口中的背景应该与 tableView(根)中的背景不同。
UIPopoverController, how to set background for popover?
[[[self.popoverController contentViewController] view] setBackgroundColor:[UIColor blueColor]];
This doesn't work((
Background in popover should be different than in tableView (root).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
UIPopoverController
继承自NSObject
,它没有背景属性或自己的视图来自定义视图的背景。因此,在这种情况下,您只能操作contentViewController
的视图。你的代码对我来说工作得很好。现在桌面视图中的背景是蓝色的。
UIPopoverController
is inherited fromNSObject
and it has no background property or own view for customizing view's background. So, in this case you can only manipulate the view ofcontentViewController
.And your code works fine for me. Background is blue in tableview now.