Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ViewWillappear 在按下一个控制器时被调用,但是当你弹出这个控制器时,在这种情况下 viewwillappear 不会在 ios 4.3.5 中调用。但它在 ios 5.0 中运行良好。它有点紧急。请告诉我。预先感谢。
只需将 viewWillAppear 消息发送到您的视图控制器,然后再将其添加为子视图/PopView。(有一个 BOOL 参数告诉视图控制器它是否被动画显示。)
[myViewController viewWillAppear:NO];
查看节拍器示例中的 RootViewController.m。
(我实际上发现 Apple 的示例项目很棒。除了 HelloWorld 之外还有很多;)