ios - ViewControllers: What's the difference between present with animation and adding as a child? -
i need present , dismiss custom view controller has menu animations. i'm trying present modally having lots of troubles error messages telling me begin/end commands out of balance , etc. seems should straightforward , isn't. i'm looking @ docs on custom containers , children controllers , etc, , totally seems overkill, if makes these errors go away guess it's worth it.
for view controller’s contents visible user, must associated window. there many ways can in app:
present view controller animation
a presented view controller isn’t specific type of view controller—the presented view controller can either content or container view controller attached content view controller. in practice, content view controller designed presented controller, can useful think of variant of content view controller.
most of time, present view controllers gather information user or capture user’s attention specific purpose. once purpose completed, presenting view controller dismisses presented view controller , returns standard app interface.as shown in image :-

make view controller child of container
a view controller hierarchy starts single parent, root view controller of window. if view controller container, may have children provide content. controllers, in turn, may containers children of own. 
the tab view controller gets size window. reserves space tab bar , gives remainder of space children. if navigation controller control displayed right now, reserves space navigation bar , hands rest content controller. @ each step, child view controller’s view resized parent , placed parent’s view hierarchy.
this combination of views , view controllers establishes responder chain events handled app.
Comments
Post a Comment