开发者

UIPopoverController, how to set background for popover?

UIPopoverController, how to set backgr开发者_运维技巧ound for popover?

[[[self.popoverController contentViewController]  view] setBackgroundColor:[UIColor blueColor]];

This doesn't work(( Background in popover should be different than in tableView (root).


UIPopoverController is inherited from NSObject and it has no background property or own view for customizing view's background. So, in this case you can only manipulate the view of contentViewController.

And your code works fine for me. Background is blue in tableview now.

_popController = [[UIPopoverController alloc] initWithContentViewController:settingsPopoverController];
[[[_popController contentViewController]  view] setBackgroundColor:[UIColor blueColor]];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜