UIRefreshControl cancel touch on top of custom cell - Objective-c iOS -


i have issue uirefreshcontrol : after first time triggered, cancels touch on top of first custom cell (even if hidden), if invisible. if remove superview, add again, issue still there.

actually have uitableview populated data. user can refresh table view pulling , i've added uirefreshcontrol table view in viewdidload()

self.refreshcontrol = [[uirefreshcontrol alloc]init]; self.refreshcontrol.tintcolor = [uicolor colorwithred:0.35 green:0.78 blue:0.98 alpha:1.0]; [_tableview addsubview:self.refreshcontrol]; 

i've not added selector refreshcontrol object because want tableview refresh when user stopped touching screen. i've added scrollview's delegate method :

- (void)scrollviewdidenddecelerating:(uiscrollview*)scrollview {      if (self.refreshcontrol.isrefreshing) {          dispatch_async(dispatch_get_global_queue(dispatch_queue_priority_default, 0), ^{              dispatch_sync(dispatch_get_main_queue(), ^{                  [self refreshtable];              });          });      }  } 

and here refresh method :

- (void)refreshtable {      //refresh code      [self.refreshcontrol endrefreshing];  } 

i don't want put app online issue, if not block user use !

thanks in advance !

i've found solution going post

so in case did not have add selector, implement uiscrollviewdelegate's method :)


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -