jeyachandran
jeyachandran

Reputation: 325

UIPopoverViewController in ios7?

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?

Upvotes: 1

Views: 4015

Answers (3)

rouhammo
rouhammo

Reputation: 91

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];

Upvotes: 0

Vicarius
Vicarius

Reputation: 304

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

There are tutorials and libraries readily available.

Upvotes: 0

Tarek Hallak
Tarek Hallak

Reputation: 18470

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 ..

Upvotes: 2

Related Questions