zoukankan      html  css  js  c++  java
  • 2016-02-24 富文本

    cellhelp.backgroundColor=RGB(232, 231,231);

                UILabel *show=[[UILabel alloc]initWithFrame:CGRectMake(15, 10, SCREEN_WIDTH-30, 20)];

                show.font=SYSTEMFONT(14);

                

                NSMutableAttributedString *strnn = [[NSMutableAttributedString alloc] initWithString:@"要开启或关闭,您可以通过iPhone的设置-通知-肝胆相照 允许通知 手动设置"];

                

    //           [strnn addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(30,4)]; //设置字体颜色

                //[UIFont boldSystemFontOfSize:20];  [UIFont fontWithName:@"Arial" size:20.0]

               [strnn addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:14] range:NSMakeRange(30, 4)]; //设置字体字号和字体类别

                

                

                //要开启或关闭,您可以通过iPhone的设-通知-肝胆相照 允许通知(加粗)  手动设置

                show.attributedText=strnn;

                show.numberOfLines=0;

                show.lineBreakMode=NSLineBreakByWordWrapping;

                [show sizeToFit];

                [cellhelp.contentView addSubview:show];

  • 相关阅读:
    字符串本质
    常用类
    异常处理
    最终类object 和内部类
    接口
    Java多态
    NIO之五Selector
    NIO之四Buffer
    NIO之三Socket通道
    JAVA NIO(二)Channel通道
  • 原文地址:https://www.cnblogs.com/gzz2016/p/5212701.html
Copyright © 2011-2022 走看看