June 2011
Intermediate to advanced
590 pages
19h 31m
English
A view hierarchy is made up of many parent-child relationships. When we talk about view hierarchies, we call parents superviews and their children subviews. When a view is added to a view hierarchy, it is retained by its superview, as shown in Figure 6.7.
Figure 6.7 View hierarchy ownership

Every subview has a pointer back to its superview so that it can send its superview messages. The superview property of a UIView is set to its superview when the view is added to a view hierarchy. (When a view is not part of a view hierarchy, superview is nil.)
Superviews are not retained by their subviews. Why not? Well, ...
Read now
Unlock full access