//添加一個(gè)子控件(可以將子控件插入到subviews數(shù)組中index這個(gè)位置)
- (void)insertSubview:(UIView *)view atIndex:(NSInteger)index;
//交換subviews數(shù)組中所存放子控件的位置
- (void)exchangeSubviewAtIndex:(NSInteger)index1 withSubviewAtIndex:(NSInteger)index2;
//添加一個(gè)子控件(新添加的控件默認(rèn)都在subviews數(shù)組的后面,新添加的控件默認(rèn)都顯示在最上面\最頂部)
- (void)addSubview:(UIView *)view;
//添加一個(gè)子控件view(被擋在siblingSubview的下面)
- (void)insertSubview:(UIView *)view belowSubview:(UIView *)siblingSubview;
//添加一個(gè)子控件view(蓋在siblingSubview的上面)
- (void)insertSubview:(UIView *)view aboveSubview:(UIView *)siblingSubview;
//將某個(gè)子控件拉到最上面(最頂部)來顯示
- (void)bringSubviewToFront:(UIView *)view;
//將某個(gè)子控件拉到最下面(最底部)來顯示
- (void)sendSubviewToBack:(UIView *)view;
/系統(tǒng)自動(dòng)調(diào)用(留給子類去實(shí)現(xiàn))/
- (void)didAddSubview:(UIView *)subview;
- (void)willRemoveSubview:(UIView *)subview;
- (void)willMoveToSuperview:(UIView *)newSuperview;
- (void)didMoveToSuperview;
- (void)willMoveToWindow:(UIWindow *)newWindow;
- (void)didMoveToWindow;
/系統(tǒng)自動(dòng)調(diào)用///是不是view的子控件或者子控件的子控件(是否為view的后代)
- (BOOL)isDescendantOfView:(UIView *)view;
//通過tag獲得對應(yīng)的子控件(也可以或者子控件的子控件)
- (UIView *)viewWithTag:(NSInteger)tag;
如果上面的文章對您在以后的開發(fā)中能派上用場,請關(guān)注或點(diǎn)個(gè)喜歡吧饼煞,我會(huì)不定期的給您分享或推薦一些好的文章哦_