viewWillApperar和ViewDidApper

在iPhone开发中,每当视图准备在屏幕上显示或者视图已在屏幕上完全显示时将调用这两个方法。

viewWillApperar—更新准备显示得视图信息,调用时视图可能还没有被加载。

ViewDidApper—来触发视图完全显示在屏幕上之后得行为,切换视图会被调用

 

viewWillAppear:
Called when the view is about to made visible. Default does nothing
视图即将可见时调用。默认情况下不执行任何操作
viewDidAppear:
Called when the view has been fully transitioned onto the screen. Default does nothing
视图已完全过渡到屏幕上时调用
viewWillDisappear:
Called when the view is dismissed, covered or otherwise hidden. Default does nothing
视图被驳回时调用,覆盖或以其他方式隐藏。默认情况下不执行任何操作
viewDidDisappear:
Called after the view was dismissed, covered or otherwise hidden. Default does nothing
视图被驳回后调用,覆盖或以其他方式隐藏。默认情况下不执行任何操作

留下评论

发表评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

%d 博主赞过: