0
votes

I've witnessed the following issue. In my code I have created UIViewController that is displayed in 'UIPopoverViewController'.

Also I get notifications when keyboard appear,disappear.

After resizing frame I do see difference in appearance on iOS 7 and iOS 6.

On iOS 6 the displayed frame become black. I do not change anywhere in code background color for the view.

Pls explain me why in one case minimized view looks correct (iOS 7) and looks strange on (iOS 6)

iOS 6.1 Simulator - wrong result enter image description here

iOS 7.1 Simulator - correct result

enter image description here

OK. I figured out possible solution. Here is the code that resolved the issue:

'UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:сontroller]; [UIPopoverController alloc] initWithContentViewController:navController];'

But, honestly speaking, I don't get why....

Result after using Navigation controller as initial controller for pop up VC:

enter image description here

1

1 Answers

0
votes

Before iOS7, changing the popover background color was not supported.

If you need it to look like that in iOS6, you'll need to do some work to customise it.

Here is a tutorial about it: http://blog.teamtreehouse.com/customizing-the-design-of-uipopovercontroller

And a github project of a replacement for the UIPopoverController: https://github.com/pcperini/PCPopoverController