iOS - pushViewController vs presentModalViewController difference

前端 未结 5 868
南旧
南旧 2021-02-01 17:17

What is the difference beetween calling presentModalViewController and pushViewController, when :

  • animation is set to NO (even if yes, th
5条回答
  •  青春惊慌失措
    2021-02-01 17:51

    This is what my experience says,if you want to manage a hierarchy of views,better go for pushViewController in the navigation controller. It works like a stack of view-controllers in the navigation controller. If however the requirement is just to show a view on executing some actions on the parent view controller then the best way is presenting it modally. If you need a complex push pop logic always prefer a pushViewController.

提交回复
热议问题