- (id)initWithFrame:(CGRect)aRect //經過一個矩形對象初始化css
Configuring a View’s Visual Appearance //配置視覺展現ios
@property(nonatomic, copy) UIColor *backgroundColor //設置背景色
@property(nonatomic, getter=isHidden) BOOL hidden //隱藏view,默認爲NO
@property(nonatomic) CGFloat alpha //設置透明度,0.0至1.0區間
@property(nonatomic, getter=isOpaque) BOOL opaque //告訴系統渲染器view是否不透明,設置YES能夠加快渲染,默認爲YES,若是設置了alpha值,應該設置爲NO
@property(nonatomic) BOOL clipsToBounds //是否裁剪超出邊界的視圖,與css中overflow相似,默認爲NO
@property(nonatomic) BOOL clearsContextBeforeDrawing //是否清除緩衝區中不可見內容,默認爲YES,若是在一個滾動操做頻繁的視圖中,應該設爲NO,以免從新渲染,提高性能
+ (Class)layerClass //能夠返回主layer所使用的類,UIView的子類能夠經過重載這個方法,來讓UIView使用不一樣的CALayer來顯示
@property(nonatomic, readonly, retain) CALayer *layer //返回Core Animation層所使用的渲染方式數組
Configuring the Event-Related Behavior //配置事件關係框架
@property(nonatomic, getter=isUserInteractionEnabled) BOOL userInteractionEnabled //設置view是否響應用戶事件,如touch、keyboard,默認爲YES
@property(nonatomic, getter=isMultipleTouchEnabled) BOOL multipleTouchEnabled //設置view是否響應多點觸摸,默認爲NO
@property(nonatomic, getter=isExclusiveTouch) BOOL exclusiveTouch //設置touch是否排它,默認爲NO佈局
Configuring the Bounds and Frame Rectangles //配置邊界和矩形框架性能
@property(nonatomic) CGRect frame //設置view框架
@property(nonatomic) CGRect bounds //設置view邊界
@property(nonatomic) CGPoint center //設置中心點
@property(nonatomic) CGAffineTransform transform //設置transform,與css相似,CGAffineTransform是個矩陣結構體動畫
Managing the View Hierarchy //管理視圖層級ui
@property(nonatomic, readonly) UIView *superview //返回父view,只讀
@property(nonatomic, readonly, copy) NSArray *subviews //返回子view集合,只讀
@property(nonatomic, readonly) UIWindow *window //返回window對象,只讀
- (void)addSubview:(UIView *)view //添加一個子view到view中
- (void)bringSubviewToFront:(UIView *)view //把一個子view位置移動到列表最前
- (void)sendSubviewToBack:(UIView *)view //把一個子view位置向後移動一格
- (void)removeFromSuperview //把調用該方法的view從其父view中移除
- (void)insertSubview:(UIView *)view atIndex:(NSInteger)index //插入一個子view到指定索引,從0開始
- (void)insertSubview:(UIView *)view aboveSubview:(UIView *)siblingSubview //插入一個子view到指定view以前
- (void)insertSubview:(UIView *)view belowSubview:(UIView *)siblingSubview //插入一個子view到指定view以後
- (void)exchangeSubviewAtIndex:(NSInteger)index1 withSubviewAtIndex:(NSInteger)index2 //交換兩個view的索引
- (BOOL)isDescendantOfView:(UIView *)view //判斷是否是指定元素的子節點或是其自己atom
Configuring the Resizing Behavior //配置尺寸改變行爲spa
@property(nonatomic) UIViewAutoresizing autoresizingMask //當父元素窗口尺寸改變時,子節點如何去自適應變化
@property(nonatomic) BOOL autoresizesSubviews //子view是否自適應變化,默認爲YES
@property(nonatomic) UIViewContentMode contentMode //view自適應變化的方式
- (CGSize)sizeThatFits:(CGSize)size //傳遞view的尺寸,返回建議的子view尺寸
- (void)sizeToFit //調整view的尺寸去適應其內容
Laying out Subviews //佈局子節點
- (void)layoutSubviews //佈局子view
- (void)setNeedsLayout //在下次更新中刷新佈局
- (void)layoutIfNeeded //當即刷新佈局
Opting in to Constraint-Based Layout //選擇約束佈局的方式
+ (BOOL)requiresConstraintBasedLayout //返回view是不是約束佈局模式,ios6
- (BOOL)translatesAutoresizingMaskIntoConstraints //返回一個BOOL,判斷自動佈局是否可爲轉換約束佈局,ios6
- (void)setTranslatesAutoresizingMaskIntoConstraints:(BOOL)flag //設置在約束佈局系統中是否把自動佈局轉換爲約束佈局,ios6
Managing Constraints //約束管理
- (NSArray *)constraints //返回view的約束句柄,ios6
- (void)addConstraint:(NSLayoutConstraint *)constraint //添加約束句柄,ios6
- (void)addConstraints:(NSArray *)constraints //添加約束句柄數組,ios6
- (void)removeConstraint:(NSLayoutConstraint *)constraint //刪除約束句柄,ios6
- (void)removeConstraints:(NSArray *)constraints //刪除約束句柄數組,ios6
Measuring in Constraint-Based Layout //測量約束佈局
- (CGSize)systemLayoutSizeFittingSize:(CGSize)targetSize //返回最合適的尺寸,ios6
- (CGSize)intrinsicContentSize //返回view的天然尺寸,ios6
- (void)invalidateIntrinsicContentSize //使內容尺寸無效化,ios6
- (UILayoutPriority)contentCompressionResistancePriorityForAxis:(UILayoutConstraintAxis)axis //待補充,ios6
- (void)setContentCompressionResistancePriority:(UILayoutPriority)priority forAxis:(UILayoutConstraintAxis)axis //待補充,ios6
- (UILayoutPriority)contentHuggingPriorityForAxis:(UILayoutConstraintAxis)axis //待補充,ios6
- (void)setContentHuggingPriority:(UILayoutPriority)priority forAxis:(UILayoutConstraintAxis)axis //待補充,ios6
Aligning Views with Constraint-Based Layout //校準約束佈局
- (CGRect)alignmentRectForFrame:(CGRect)frame //待補充,ios6
- (CGRect)frameForAlignmentRect:(CGRect)alignmentRect //待補充,ios6
- (UIEdgeInsets)alignmentRectInsets //待補充,ios6
- (UIView *)viewForBaselineLayout //待補充,ios6
Triggering Constraint-Based Layout //觸發約束佈局
- (BOOL)needsUpdateConstraints //返回約束佈局是否須要更新,YES爲是,ios6
- (void)setNeedsUpdateConstraints //更新約束佈局,ios6
- (void)updateConstraints //更新約束佈局,ios6
- (void)updateConstraintsIfNeeded //更新約束佈局及其子佈局,ios6
Debugging Constraint-Based Layout //調試約束佈局
- (NSArray *)constraintsAffectingLayoutForAxis:(UILayoutConstraintAxis)axis //待補充,ios6
- (BOOL)hasAmbiguousLayout //待補充,ios6
- (void)exerciseAmbiguityInLayout //待補充,ios6
Drawing and Updating the View //繪製和更新視圖
- (void)drawRect:(CGRect)rect //在view中繪製一個矩形
- (void)setNeedsDisplay //使view重繪
- (void)setNeedsDisplayInRect:(CGRect)invalidRect //指定矩形重繪
@property(nonatomic) CGFloat contentScaleFactor //待補充
Formatting Printed View Content //格式化內容
- (UIViewPrintFormatter *)viewPrintFormatter //返回view的打印對象
- (void)drawRect:(CGRect)area forViewPrintFormatter:(UIViewPrintFormatter *)formatter //使用某個區域來打印
Managing Gesture Recognizers //管理手勢
- (void)addGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer //添加手勢識別器
- (void)removeGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer //刪除手勢識別器
@property(nonatomic, copy) NSArray *gestureRecognizers //獲取手勢集合
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer //經過返回值決定是否識別此手勢
Animating Views with Blocks //使多個view執行動畫
+ (void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion //使一個或多個view執行動畫
+ (void)animateWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion //使一個或多個view執行動畫
+ (void)animateWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations //使一個或多個view執行動畫
+ (void)transitionWithView:(UIView *)view duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion //在一個view上建立過渡動畫
+ (void)transitionFromView:(UIView *)fromView toView:(UIView *)toView duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options completion:(void (^)(BOOL finished))completion //
Animating Views //view動畫
+ (void)beginAnimations:(NSString *)animationID context:(void *)context //標誌動畫代碼開始