美文网首页
富文本那些事

富文本那些事

作者: KeepFighting | 来源:发表于2016-02-13 13:20 被阅读14次

    1.UIKIT 框架第 一个文件

    2.使用方式

    1)NSDictionary* attrDict =@{NSForegroundColorAttributeName:[UIColorwhiteColor]};NSAttributedString* attributedString = [[NSAttributedStringalloc]initWithString:self.placeholderattributes:attrDict];

    [selfsetAttributedPlaceholder: attributedString];

    2)

    UITabBarItem* item = [UITabBarItemappearanceWhenContainedIn:self,nil];

    //normal状态

    NSDictionary* dict =@{NSFontAttributeName:[UIFontsystemFontOfSize:13]};

    [itemsetTitleTextAttributes:dictforState:UIControlStateNormal];

    //选中状态

    dict =@{NSForegroundColorAttributeName:[UIColorblackColor]};

    [itemsetTitleTextAttributes:dictforState:UIControlStateSelected];

    相关文章

      网友评论

          本文标题: 富文本那些事

          本文链接:https://www.haomeiwen.com/subject/arbukttx.html