i have developed an iPad app. In that app i have 4 separate views embedded inside a single view controller and there is a navigation bar for each view.I want to set the corner radius of each navigation bar.
i tried
customNavigationBar.layer.cornerRadius = 25;
but this piece of code is not working. Does anyone know how to set the corner radius for each navigation bar.
The corner radius is a measurement describing the curve on the corners of your labels. This is measured in millimetres and refers to the radius of the circle created if the curve was extended to create a full circle.
"label. layer. masksToBounds = true" is an important code, if you apply corner radius to a label and if it dosen't work than adding this will definitely add the corner radius to a particular label.. So this should be the correct answer..
customNavigationBar.layer.cornerRadius=25;
customNavigationBar.clipsToBounds=YES;
i have tested it successfully
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