国产探花免费观看_亚洲丰满少妇自慰呻吟_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)實現代碼,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對武林網網站的支持!

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 五大连池市| 桃园市| 安多县| 同江市| 普兰店市| 奎屯市| 甘孜| 通州市| 深圳市| 新干县| 巴东县| 寻乌县| 咸宁市| 海阳市| 浦城县| 巨鹿县| 育儿| 比如县| 闵行区| 临夏市| 阳谷县| 昭苏县| 峨边| 南郑县| 邢台市| 泰州市| 稻城县| 蒲城县| 彭阳县| 日喀则市| 军事| 佛坪县| 全南县| 同德县| 章丘市| 寿光市| 北安市| 博野县| 奉化市| 游戏| 涪陵区|