Last Updated: October 06, 2018
· cherifya

Add a border to any UIView

Adding a border to any UIView can be accomplished very simply by accessing the UIView underlying layer and setting the boderColor and borderWitdth attributes :

UIView *view = [[UIView alloc] init];
//Add a white border 
view.layer.borderColor = [UIColor colorWithWhite:1.0f alpha:1.0f].CGColor;
view.layer.borderWidth = 1.0f; //make border 1px thick

Enjoy :)

2 Responses
Add your response


thats a really good idea , can think about that
best regards
https://discord.software/ https://adobereader.onl/ https://itunes.red/

2 months ago ·

Its beautiful! I can't get enough of the sleek design of DOOGEE V. Really excited to get one for me.

https://emus4u.co https://tutuappapk.vip https://tutuhelperx.com http://movieboxhdapp.org/movie-box-mac/

11 days ago ·