I am making a custom popover background by subclassing UIPopoverBackgroundView. I want to make popover without rounded corners. I can successfully create background without rounded corners (red in picture), but it seems that UIPopoverController adds some rounded corner mask to the content of the popover (green in picture). Here is the picture of the corner of my popover:
Any ideas how I can overcome it?
Just look for imageView. layer. cornerRadius within the cell implementation, remove it, then jobs done! Maybe the corner radius is being set in the view controller?
The border-radius CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners.
To create a rounded corner, we use the CSS border-radius property. This property is used to set the border-radius of element.
I found an easy solution, in the popover content controller (what you pass to initWithContentViewController
) add:
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
self.view.superview.layer.cornerRadius = 0;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With