Size changes propagation to child view controller
In A Look Inside Presentation Controllers - WWDC 2014
session the following pattern was introduced.
- A
child view controller
or apresented view controller
can issue a request for size update by setting itspreferredContentSize
property. - A
parent view controller
or apresentation controller
will receive a callback onpreferredContentSizeDidChangeForChildContentContainer
method. - At this point the receiver can decide if can allow the size request and layout the child view controller or the presented view controller.