Swift: Reload a View Controller

后端 未结 8 980
南旧
南旧 2020-12-15 02:41

I need to refresh a view controller when a certain button is tapped. Simply activating viewDidLoad() does not seem to be working for what I need to

8条回答
  •  余生分开走
    2020-12-15 03:37

    If you need to update the canvas by redrawing views after some change, you should call setNeedsDisplay.

    Thank you @Vincent from an earlier comment.

提交回复
热议问题