0515.View Hierarchy [UIKit](二)

2014-11-24 12:57:11 · 作者: · 浏览: 23
w *)subview; - (void)willMoveToSuperview:(UIView *)newSuperview; - (void)didMoveToSuperview; - (void)willMoveToWindow:(UIWindow *)newWindow; - (void)didMoveToWindow;

思考:视图回调主要是用于跟踪视图的相关改变

5、Set view tag and search view

myView.tag = 1011;

UILabel *label =(UILablel *)[self.view viewWithTag:1011];

6、isDescendantOfView

- (BOOL)isDescendantOfView:(UIView *)view;

思考:主要用于判断的一个View是不是另一个View的子subView