To give border color to UIButton :-
1. Take UIButton as property .
2. Give corner radius and corner width to UIButton.
3. Now give border color to UIButton.
For Swift use :-
demoButton.backgroundColor = UIColor.clearColor()
demoButton.layer.cornerRadius = 5
demoButton.layer.borderWidth = 1
demoButton.layer.borderColor = UIColor(red: 74/255, green: 218/255, blue: 163/225, alpha: 1).CGColor
For Objc use :-
self.demoButton.layer.borderWidth = 1;
self.demoButton.layer.borderColor = [UIColor whiteColor].CGColor;
self.demoButton.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; self.demoButton.layer.cornerRadius = 3.0;
0 Comment(s)