I am using a UIWebView for displaying some formatted text. I am using the line:
sliderTextWebview.layer.cornerRadius = 10;
to round the corners of the UIWebview. The corners are not rounded but if you pull the text in the view down or up you can see the rounded corners of the UIWebView behind. It appears that the text frame sits above the web view background, but this frame's corners are not rounded.
Try
sliderTextWebview.layer.masksToBounds = YES
For Swift 4+, it should be
sliderTextWebview.layer.masksToBounds = true
These lines will help you out. Try these
sliderTextWebview.layer.cornerRadius = 10;
sliderTextWebview.layer.masksToBounds = YES;
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