gpt4 book ai didi

iphone - 为什么要使用模态视图

转载 作者:行者123 更新时间:2023-12-01 17:16:41 27 4
gpt4 key购买 nike

这个问题一直困扰着我。为什么人们有时将 View Controller 呈现为模态视图 Controller ?你不能总是把 View Controller 推到导航 Controller 上然后再弹出吗?它似乎更加直接和一致。我见过人们交替使用这两者,结果让我抓狂。

是否有任何特定情况下最好将 View Controller 呈现为模态视图 Controller ?

最佳答案

苹果View Controller Programming Guide很好地描述了它的用途。

Modal view controllers provide interesting ways to manage the flow of your application. Most commonly, applications use modal view controllers as a temporary interruption in order to obtain key information from the user.





There are several reasons to use modal view controllers in your application:

  • Use them to gather information from the user immediately.
  • Use them to present some content temporarily.
  • Use them to change work modes temporarily.
  • Use them to implement alternate interfaces for different device orientations.
  • Use them to present a new view hierarchy with a specific type of animated transition (or no transition).

关于iphone - 为什么要使用模态视图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7068799/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com