中文字幕在线观看,亚洲а∨天堂久久精品9966,亚洲成a人片在线观看你懂的,亚洲av成人片无码网站,亚洲国产精品无码久久久五月天

UIButton 設(shè)置圓角 邊框顏色 點(diǎn)擊回調(diào)方法

2018-07-20    來源:open-open

容器云強(qiáng)勢(shì)上線!快速搭建集群,上萬Linux鏡像隨意使用

UIButton *signBtn = [UIButton buttonWithType:UIButtonTypeCustom];

signBtn.frame = CGRectMake(0, 0, 80, 40);

[signBtn.layer setMasksToBounds:YES];

[signBtn.layer setCornerRadius:10.0]; //設(shè)置矩形四個(gè)圓角半徑

[signBtn.layer setBorderWidth:1.0]; //邊框?qū)挾?
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();

CGColorRef colorref = CGColorCreate(colorSpace,(CGFloat[]){ 1, 0, 0, 1 }); 

[signBtn.layer setBorderColor:colorref];//邊框顏色

[signBtn setTitle:@"還  原" forState:UIControlStateNormal];//button title

[signBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];//title color

[signBtn addTarget:self action:@selector(buttonDonwRecover:) forControlEvents:UIControlEventTouchUpInside];//button 點(diǎn)擊回調(diào)方法

signBtn.backgroundColor = [UIColor whiteColor];

- (void)buttonDonwRecover:(id)sender

{

    UIButton *btn = (UIButton *)sender;

}

標(biāo)簽:

版權(quán)申明:本站文章部分自網(wǎng)絡(luò),如有侵權(quán),請(qǐng)聯(lián)系:west999com@outlook.com
特別注意:本站所有轉(zhuǎn)載文章言論不代表本站觀點(diǎn)!
本站所提供的圖片等素材,版權(quán)歸原作者所有,如需使用,請(qǐng)與原作者聯(lián)系。

上一篇: iOS之?dāng)?shù)據(jù)請(qǐng)求NSURLConnection

下一篇:python通過mechanize模塊實(shí)現(xiàn)不斷刷新網(wǎng)頁的功能