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]];
精彩评论