ios - UIRefreshControl not spinning when beginRefreshing is called from delegate -
i have main view controller fonction
func beginquerydata() { if !refreshcontrol.refreshing { refreshcontrol.beginrefreshing() if let colview = collectionview { colview.setcontentoffset(cgpoint(x: 0, y: colview.contentoffset.y - refreshcontrol.frame.height), animated: true) } querydata() } }
this works fine when called in viewdidappear of viewdidload.
now, have setting view controller push on top of view controller. each time change setting in setting view controller, call beginquerydata() of viewcontroller set delegate of setting view controller. (delegate.settingschanged())
the problem:
the main viewcontroller refreshed, spinning icon shown it's not animating... tried endrefreshing , beginrefreshing in viewdidload() doesn't work, spinning icon disappears.
Comments
Post a Comment