Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove the border of the programmatically created Custom Button

I know to set the border to the button by the following ways,

button.layer.cornerRadius = 0.0;
button.layer.borderWidth = 2.5;
button.layer.borderColor = [[UIColor darkGrayColor] CGColor];

But I need to know how to remove or delete the border of the button?

like image 371
Sharme Avatar asked Dec 13 '11 12:12

Sharme


People also ask

How do you hide the outline of a button?

If you want to remove the focus around a button, you can use the CSS outline property. You need to set the “none” value of the outline property.


2 Answers

button.layer.borderWidth = 0.0;

Will make the border invisible.

like image 176
jrturton Avatar answered Sep 28 '22 04:09

jrturton


button.layer.borderColor = [UIColor colorWithRed:0.3 green:0.6 blue:0.9 alpha:0.1];
//                                set 'alpha' to something less than 1. -----^^^

Try this !

like image 43
StackFlowed Avatar answered Sep 28 '22 03:09

StackFlowed