Question

In iOS 6 UIPopoverView have border with black translucent colour but iOS 7 do not have border because iOS 7 become transparent. how to add border with black translucent colour in iOS 7.

Can anyone know please help me to solve this problem?

Was it helpful?

Solution

The popover in iOS7 is white and blur, from Apple:

In iOS 7, the popover background is a white blur, which means that the background of the popover’s content view can be transparent. A table view inside a popover automatically uses a translucent appearance; custom content inside a popover should use a translucent appearance.

Unfortunately Popover is not customizable, you need to use some alternative:

GIKPopoverBackgroundView

WYPopoverController

Or any other ..

OTHER TIPS

You can use the UIPopoverBackgroundView to achieve a custom but similar effect.

There are tutorials and libraries readily available.

Have you tried this for ios7.0 and later?

[popoverController presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
popoverController.contentViewController.view.layer.borderWidth = 5;
popoverController.contentViewController.view.layer.borderColor = [[UIColor blackColor] CGColor];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top