重新加载UIViewController [英] reload UIViewController

查看:51
本文介绍了重新加载UIViewController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个特定的代码,该代码在我拥有的UIViewController的viewDidLoad()上执行.问题在于它仅是第一次加载.第一次加载后,我切换到其他视图并回到该视图,它不会再次调用viewDidLoad.那么我应该在哪里放置此代码,以便每次显示此视图时都执行此代码?

I have a certain code that is executed on the viewDidLoad() of a UIViewController I have. The problem is that it is only loaded for the first time only. After it is loaded the first time and I switch to some other view and come back to this view, it doesn't call the viewDidLoad again. So where should I put this code at so that everytime this view is displayed it executes this code?

推荐答案

我猜在 viewWillAppear 中祝你好运

这篇关于重新加载UIViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆