代码之家  ›  专栏  ›  技术社区  ›  casillas

viewWillAppear只调用一次[重复]

  •  1
  • casillas  · 技术社区  · 8 年前

    我有以下故事板。有一个 OrderViewController 当我第一次打开应用程序时,它会调用 -(void) viewWillAppear: (BOOL) animated viewWillAppear

    enter image description here

    1 回复  |  直到 8 年前
        1
  •  7
  •   Forge Nand Parikh    7 年前

    您发送了 viewWillAppear 将视图添加到窗口的视图层次结构时的消息。

    UIApplicationWillEnterForeground 通知或 UIApplicationWillBecomeActive

    “Strategies for Handling App State Transitions” in the App Programming Guide for iOS 有关何时发送这些通知的详细信息。