zoukankan      html  css  js  c++  java
  • uibutton设置

    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;

  • 相关阅读:
    tableView小细节
    iOS5 切换中文键盘时覆盖输入框的解决方案
    NSBundle读取txt文件,图片,plist
    iOS OC 字符串处理
    图片拉伸 几种方式
    UIAlertView小结
    新来报道
    VC6.0之Debug调试总结
    关于C++中的临时对象问题
    与临时对象的斗争(下)
  • 原文地址:https://www.cnblogs.com/NSNULL/p/4597138.html
Copyright © 2011-2022 走看看