Home > DeveloperSection > Forums > Custom border color on UIView in iOS.
Tarun Kumar

Total Post:213

Points:1635
Posted on    December-26-2015 4:01 AM

 iPhone iPhone  Ios  Objective C 
Ratings:


 1 Reply(s)
 314  View(s)
Rate this:
I want to set border color of UIView controller in our iPhone application.
Can I set custom border color by programmatically?


Tarun Kumar

Total Post:213

Points:1635
Posted on    December-27-2015 10:46 PM

I got a solution, we can set UIView border width and border color using this code:

view.layer.borderWidth = 1;
view.layer.borderColor = UIColor.blueColor().CGColor;

Modified On Jan-11-2016 01:27:49 AM

Don't want to miss updates? Please click the below button!

Follow MindStick