BButton按鈕樣式分為2.0版本和3.0版本
- 如下圖所示
BButton樣式2.0版本.png
BButton樣式3.0版本.png
- 使用步驟
- 為支持FontAwesome這個(gè)巨牛逼的文字庫(kù),需要在Info.plist里面添加該項(xiàng)目(重點(diǎn)!!!)
info.plist.png
- 簡(jiǎn)單示例代碼
//按鈕尺寸
CGRect frame = CGRectMake(100, 200, 100, 30);
//按鈕背景色格式
BButtonType type = BButtonTypePrimary;
//按鈕3.0版本
BButtonStyle style = BButtonStyleBootstrapV3;
self.testBtn = [[BButton alloc]initWithFrame:frame type:type style:style icon:FAThumbsOUp fontSize:15];
[self.testBtn setTitle:@"登錄" forState:UIControlStateNormal];
//NO:文字在前,圖片在后 YES:圖片在前,文字在后
[self.testBtn addAwesomeIcon:FAThumbsOUp beforeTitle:NO];
[self.view addSubview:self.testBtn];
登錄.png
- 按鈕圓角處理示例代碼
[[BButton appearance] setButtonCornerRadius:[NSNumber numberWithFloat:50.0f]];
圓角效果圖片.png
- FontAwesome圖標(biāo)網(wǎng)站(展示了300個(gè)圖標(biāo)左右,并不完全),如有完全的圖標(biāo)網(wǎng)站,請(qǐng)留言告訴下筆者,共同學(xué)習(xí)
FontAwesome對(duì)應(yīng)圖標(biāo)網(wǎng)站
勤學(xué)如早春之苗,不見(jiàn)其增,日有所漲。
輟學(xué)如磨刀之石,不見(jiàn)其減,日有所損。