ios - `UIRefreshControl endRefreshing` not working -
i've got pull-to-refresh feature in app is, far can tell, set "normal way":
uirefreshcontrol *refreshcontrol = [[uirefreshcontrol alloc] init]; refreshcontrol.attributedtitle = [[nsattributedstring alloc] initwithstring:@"pull refresh"]; [refreshcontrol addtarget:self action:@selector(refreshpage) forcontrolevents:uicontroleventvaluechanged]; self.refreshcontrol = refreshcontrol;
the refreshing part works fine. after done refreshing call
[self.refreshcontrol endrefreshing]
at point, appears ignore call , continues show pull-to-refresh "gap", without spinner:
(i have breakpoint @ line verify endrefreshing
is being called)
if jiggle page thumb (pull down without pulling far enough trigger pull-to-refresh), fix , spring place. why doesn't spring when call [self.refreshcontrol endrefreshing]
? there way can programmatically force spring back?
i've tried placing endrefreshing
call in delay:
[self.refreshcontrol performselector:@selector(endrefreshing) withobject:nil afterdelay:0.0]
but still ignores call.
it turns out, in case, problem code adding uirefreshcontrol
being hit more once , creating more 1 refreshcontrol, endrefreshing
being called on different instance of uirefreshcontrol
1 started pull-to-refresh.
dumb mistake on part.
Comments
Post a Comment