如何在不下拉的情况下激活刷新控件(Swift)

How to activate refresh control without pulling down (Swift)

我想立即在 table 视图中显示刷新控件的微调器,而不需要用户下拉 table 视图来刷新它。那可能吗?如果是,我该如何实施?我已经有运行 7 秒的 UIRefreshControl,然后弹出另一个视图。 谢谢!

解决方法很简单:

refreshControl.beginRefreshing()

https://developer.apple.com/documentation/uikit/uirefreshcontrol/1624842-beginrefreshing