This is a category of UIView which provided the ability of add specified corner(s) to a view with a optional border.
- Fix wrong frame when set border in viewDidLoad.
pod 'TCRoundedCorner', '~> 1.0.0'
Add files in folder TCRoundedCorner to your project.
1.Only round myView's corners:
[self.myView roundedCorner:type radius:20.0];
2.Round corners and add a border together:
[self.myView roundedCorner:type radius:20.0 borderColor:borderColor borderWidth:5.0];
3.Add border only:
[self.myView addBorderWithColor:borderColor borderWidth:5.0];
4.Remove border:
[self removeBorder];
Distributed under the MIT License.
If you wish to contact me, email at: [email protected]