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

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -