UIKit Relative Frame Understanding
Orange View
In Figure 1 as you can see Orange View constraint from top 37 , height = 400 , leading and trailing = 0
In Figure 4 you will see the globalFrame which is distance of that view with window if specify nil , so for orange view there is no logic at all , since orange view is same frame with parent and window.
For figure 3 you can understand midX , minX and maxX, middle of that view with parent or global frame which is window same from minX and maxX
Green View
In Figure 5 as you can see Green View constraint
topToSuperView → topToOrangeView → 16
bottomToBlueView → 16
height → 100
leading and trailing to superView → leading and trailing to orangeView → 16
Figure 6, 7 you can observe
frame from parent it gives the value
For global frame you can see , just consider window as parent and neglect orange view so from window x = 16 , y = 128 + 16 = 144 is the only difference since for x perceptive parent view act as window but for y things change
Red View
16 points to parent which is green view from everywhere 4 side simple
Green View as parent Normal Flow
Global Frame (Window as parent View)
White View
16 points to parent which is red view from everywhere 4 sides simple
Red View as parent Normal Flow
Window as parent
Now this is very important White View with Parent GreenView instead of RedView , note we are only getting frame in respect to GreenView we are not changing parent view