I've a UIViewController
and I'm displaying it as UIModalPresentationPopover. It had its corner radius set to 10.0 and border width to 1.0.
- (void)viewWillLayoutSubviews {
[super viewWillLayoutSubviews];
self.view.layer.borderWidth = 1.0f;
self.view.layer.cornerRadius = 10.0f;
self.view.layer.masksToBounds = YES;
}
It is not showing any border along corner radius and it is giving a weird effect. It was working fine before iOS10. What should I do to solve this problem?
Edit: The screenshots are as
If i add 2 pixel border then still 1 pixel is missing from View
Your code is good but it is missing one line,
view.clipsToBounds = true
Set this line and run again.
Hope this will help you.
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