zoukankan      html  css  js  c++  java
  • UILabel头文件常见属性

    • text : default is nil 文本属性,默认值是 nil
    @property(nullable, nonatomic,copy) NSString *text;          
    
    • font : default is nil (system font 17 plain) 字体属性,默认系统17号字体
    @property(null_resettable, nonatomic,strong) UIFont *font;                     
    
    • textColor : default is nil (text draws black) 文本颜色属性,默认黑色
    @property(null_resettable, nonatomic,strong) UIColor *textColor;       
    
    • shadowColor : default is nil (no shadow) 阴影属性,默认没有阴影
    @property(nullable, nonatomic,strong) UIColor *shadowColor;      
    
    • shadowOffset : default is CGSizeMake(0, -1) -- a top shadow 阴影偏移位置,默认顶部位置有1个点的阴影
    @property(nonatomic) CGSize shadowOffset;     
    
    • textAlignment : default is NSTextAlignmentLeft 文本对齐方式,默认左对齐。(取值为枚举)
    @property(nonatomic) NSTextAlignment textAlignment;     
    
    • attributedText : 可在设置文字时,同时设置文字的属性内容,包括字体,颜色等。
    @property(nullable, nonatomic,copy)   NSAttributedString *attributedText NS_AVAILABLE_IOS(6_0);   
    
    • highlighted : default is NO 是否高亮,默认状态 NO
    @property(nonatomic,getter=isHighlighted) BOOL highlighted;  
    
    • highlightedTextColor : default is nil,高亮状态时文本颜色。 默认 nil
    @property(nullable, nonatomic,strong) UIColor *highlightedTextColor; 
    
    • userInteractionEnabled : default is NO 是否可以跟用户交互,默认 NO
    @property(nonatomic,getter=isUserInteractionEnabled) BOOL userInteractionEnabled;  
    
    • enabled : default is YES. changes how the label is drawn 是否是可用状态,默认YES,可以改变标签如何绘制
    @property(nonatomic,getter=isEnabled) BOOL enabled;     
    
    • numberOfLines : 文本显示的行数。0是无限行
    @property(nonatomic) NSInteger numberOfLines;   
    
    • adjustsFontSizeToFitWidth : default is NO。调整字体的大小以适应标签的大小。默认不调整。
    @property(nonatomic) BOOL adjustsFontSizeToFitWidth;    
    
  • 相关阅读:
    MSSQLSERVER数据库 C#里调用存储过程,多参数查询,个人记录
    ASP.NET GridView和Repeater合并单元格
    C# XPath教程
    MSSQLSERVER数据库 导入文本文件
    MSSQLSERVER数据库 递归查询例子
    C# TreeView右键弹出菜单
    tomcat 下War包部署方法
    JAVA自定义标签教程及实例代码
    JAVA tag学习
    Java Quartz 自动调度
  • 原文地址:https://www.cnblogs.com/sleepingSun/p/5329161.html
Copyright © 2011-2022 走看看