国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > iOS > 正文

iOS中長條藍色按鈕(button)實現代碼

2020-07-26 02:44:11
字體:
來源:轉載
供稿:網友

一,效果圖。

二,代碼。

ViewController.m

- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. //添加設備 UIButton *deviceButton=[UIButton buttonWithType:UIButtonTypeRoundedRect]; deviceButton.frame=CGRectMake((self.view.frame.size.width-320)/2, 100, 320, 38); [deviceButton setTitle:@"添加設備" forState:UIControlStateNormal]; deviceButton.backgroundColor=[UIColor colorWithRed:59/255.0 green:89/255.0 blue:152/255.0 alpha:1.0]; deviceButton.titleLabel.textColor=[UIColor whiteColor]; [deviceButton setTintColor:[UIColor whiteColor]]; [deviceButton addTarget:self action:@selector(doClickDeviceButton:) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:deviceButton];}#pragma -mark -doClickActions//添加設備-(void)doClickDeviceButton:(UIButton *)btn{ NSLog(@"---doClickDeviceButton----");}

總結

以上所述是小編給大家介紹的iOS中長條藍色按鈕(button)實現代碼,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對武林網網站的支持!

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 平湖市| 通辽市| 东辽县| 循化| 建昌县| 阿坝县| 靖西县| 通榆县| 江油市| 乐清市| 乐昌市| 隆德县| 沿河| 顺平县| 扎兰屯市| 沾化县| 永城市| 达州市| 延川县| 竹山县| 荔浦县| 开平市| 开封县| 肃宁县| 海宁市| 璧山县| 通河县| 宣威市| 葫芦岛市| 黄冈市| 堆龙德庆县| 烟台市| 武定县| 云安县| 武城县| 仙桃市| 景泰县| 鹤山市| 噶尔县| 平遥县| 珠海市|