我如何重新加载UIView?

时间:2021-04-24 23:09:50

How do I reload a UIView after viewDidLoad + viewWillAppear have already been called (and the view displayed)?

如何在调用viewDidLoad + viewWillAppear(并显示视图)后重新加载UIView?

If it helps - I'm loading it from a xib/nib file, and expect that calling the method should only trigger viewWillAppear on the controller, not to reload the whole nib file.

如果它有帮助 - 我从xib / nib文件加载它,并期望调用该方法只应触发控制器上的viewWillAppear,而不是重新加载整个nib文件。

1 个解决方案

#1


11  

How about [yourViewController.view setNeedsDisplay]?

[yourViewController.view setNeedsDisplay]怎么样?

#1


11  

How about [yourViewController.view setNeedsDisplay]?

[yourViewController.view setNeedsDisplay]怎么样?