码迷,mamicode.com
首页 > 其他好文 > 详细

uibutton设置

时间:2015-06-24 12:33:18      阅读:102      评论:0      收藏:0      [点我收藏+]

标签:

UIButton *selectMore = [UIButton buttonWithType:UIButtonTypeCustom];
            selectMore.frame = CGRectMake(0, __kScreenHeight - 42, __kScreenWidth / 2, 42);
           // UIButton *selectMore = [[UIButton alloc] initWithFrame:CGRectMake(0, __kScreenHeight - 42, __kScreenWidth / 2, 42)];
            NSString *filePath = [[NSBundle mainBundle] pathForResource:@"selectMore" ofType:@"png"];
           // [selectMore setBackgroundImage:[UIImage imageWithContentsOfFile:filePath] forState:UIControlStateNormal];
            [selectMore setBackgroundColor:__kColorWithRGB(240, 241, 243, 1)];
            [selectMore setTitle:@"选择更多商品" forState:UIControlStateNormal];
            [selectMore setTitle:@"选择更多商品" forState:UIControlStateHighlighted];
            selectMore.titleLabel.font = [UIFont boldSystemFontOfSize:22];
            //selectMore.titleLabel.textColor = [UIColor greenColor];
            [selectMore setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
            [selectMore addTarget:self action:@selector(moreClick:) forControlEvents:UIControlEventTouchUpInside];
            [self.view addSubview:selectMore];
            _selectMoreBtn = selectMore;

uibutton设置

标签:

原文地址:http://www.cnblogs.com/NSNULL/p/4597138.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!