首页 > 其他 > 详细

uibutton设置

时间:2015-06-24 12:30:37      阅读:94      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!