开发者

UIPopoverController, how to set background for popover?

开发者 https://www.devze.com 2023-04-01 23:43 出处:网络
UIPopoverController, how to set backgr开发者_运维技巧ound for popover? [[[self.popoverController contentViewController]view] setBackgroundColor:[UIColor blueColor]];

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

精彩评论

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