Arrange UIView with respect to external UIViews

How do I organize (in terms of depth) a view in a view of a view in front of another view?

The hierarchy is as follows:

A--
   -C
   -D
B--
   -E
   -F

(A and B are species with C and D, and E and F are respectively).

B is superimposed over A, therefore, each similarity in B (E and F) is located above each subzone in (C and D). How can I make the mapping C above everything in B, but the rest remains as it should be?

In other words, how can I make the order of the displayed views (the first in the list the highest and the next after it):

C
B
E & F (same level)
A
D

Thank you Arseny

+3
source share
5 answers

, . A B , C B, A D , C A , A .

+2

UIView / ?

insertSubview:aboveSubview:
insertSubview:atIndex:
insertSubview:belowSubview:
addSubViews:
bringSubviewToFront:
removeFromSuperview:
+1

, C B, B.

0

C A B. , .

C
  -B
    -E
    -F
  -A
    -D

, .

0

A B UIViewControllers? C, D, E, F UIViews ? .

UIViewController, . .

0

Source: https://habr.com/ru/post/1736243/


All Articles