一:首先查看一下关于UIView的定义NS_CLASS_AVAILABLE_IOS(2_0) @interface UIView : UIResponder <NSCoding, UIAppearance, UIAppearanceContainer, UIDynamicI ...
一:首先查看一下关于UIView的定义
NS_CLASS_AVAILABLE_IOS(2_0) @interface UIView : UIResponder <NSCoding, UIAppearance, UIAppearanceContainer, UIDynamicItem, UITraitEnvironment, UICoordinateSpace>+ (Class)layerClass; // 默认为 [CALayer class].用于创建视图的底层时使用。- (instancetype)initWithFrame:(CGRect)frame NS_DESIGNATED_INITIALIZER; //初始化视图- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;@property(nonatomic,getter=isUserInteractionEnabled) BOOL userInteractionEnabled; // 默认是是。如果设置为NO,用户事件(触摸,键)将被忽略,并从事件队列中删除。@property(nonatomic) NSInteger tag; // 默认为 0@property(nonatomic,readonly,strong) CALayer *layer; // 返回视图层。将始终返回一个非零值。视图是层的委托.+ (UIUserInterfaceLayoutDirection)userInterfaceLayoutDirectionForSemanticContentAttribute:(UISemanticContentAttribute)attribute NS_AVAILABLE_IOS(9_0); //用户界面的布局方向 IOS9以后的功能@property (nonatomic) UISemanticContentAttribute semanticContentAttribute NS_AVAILABLE_IOS(9_0); //UIView 也增加了 UISemanticContentAttribute 这样一个属性来判断视图是否会遵循显示的方向規則(默认是 UISemanticContentAttributeUnspecified )@end
海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com
原标题:你真的了解UIView吗?
关键词:ie
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。