作者:GuangLi1472_716 | 来源:互联网 | 2023-06-09 17:48
self.btns2.titleLabel.font = [UIFontsystemFontOfSize:15.0];//设置文字大小
[self.btns2setTitleColor:BlackColorforState:UIControlStateNormal];//设置颜色
//设置位置--右对齐
self.btns2.contentHorizontalAlignment =UIControlContentHorizontalAlignmentRight-100;
// 设置位置 距离右边框距离偏移14
self.btns2.contentEdgeInsets =UIEdgeInsetsMake(0,0,0,14);
//设置button边框
[self.btns2.layersetBorderWidth:0.5];
CGColorSpaceRef colorSpaceRefss = CGColorSpaceCreateDeviceRGB();
CGColorRef colorss = CGColorCreate(colorSpaceRefss, (CGFloat[]){208/255.0,208/255.0,208/255.0,1});
[self.btns2.layersetBorderColor:colorss];
[self.viewsaddSubview:self.btns2];