/ Published in: Objective C

Provide Square/Rounded corners for UIElements like UISegmentedControl, UIButton etc.
Use 'cornerradius' property for setting the type of corner.
Use 'cornerradius' property for setting the type of corner.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Rounded Corners -------------- self.UIElementName.layer.cornerRadius = 7.0; // vary this radius value to achieve suitable corner self.UIElementName.layer.borderWidth = 0.8f; //sets the border width of UIElement self.UIElementName.layer.borderColor = [UIColor redColor].CGColor; Square Corners -------------- self.UIElementName.layer.cornerRadius = 0.0; // sets the corner radius value to zero to get a square corner
Comments
