_INTERESTEDBTN = [UIButton buttonwithtype:uibuttontypecustom];
_interestedbtn.layer.cornerradius = 8;
_interestedbtn.layer.bordercolor = [Uicolor Orangecolor]. Cgcolor;
_interestedbtn.layer.borderwidth = 1;
_interestedbtn.layer.maskstobounds = YES;
[_interestedbtn settitle:@ "interested" forstate:uicontrolstatenormal];
[_interestedbtn settitle:@ "is interested in" forstate:uicontrolstateselected];
[_interestedbtn Settitlecolor:[uicolor Orangecolor] forstate:uicontrolstatenormal];
[_interestedbtn Settitlecolor:[uicolor Lightgraycolor] forstate:uicontrolstateselected];
[_interestedbtn addtarget:self Action: @selector (interestedbtnaction:) forControlEvents: UIControlEventTouchUpInside];
[Self.contentview ADDSUBVIEW:_INTERESTEDBTN];
-(void) Interestedbtnaction: (UIButton *) sender{
sender.selected =!sender.selected;
if (sender.selected) {
_interestedbtn.layer.cornerradius = 8;
_interestedbtn.layer.bordercolor = [Uicolor Lightgraycolor]. Cgcolor;
_interestedbtn.layer.borderwidth = 1;
_interestedbtn.layer.maskstobounds = YES;
}else{
_interestedbtn.layer.cornerradius = 8;
_interestedbtn.layer.bordercolor = [Uicolor Orangecolor]. Cgcolor;
_interestedbtn.layer.borderwidth = 1;
_interestedbtn.layer.maskstobounds = YES;
}
}
Rounded corners of the UIButton