uitableview - Cancel UIRefreshControl when dragged up -


when refreshing taking place, (actionwheel spinning after pull down), want able cancel refreshing - facebook app.

pull down refresh , while not done yet, if pull spinner outside view, stop/cancel refresh.

i've tried check scrollviewdidscroll check against first visible row, action isn't smooth.

any better idea on how implement this?

thanks in advance!

actually, figured out. hope helps :)

when starting refresh, set kind of flag (here 'refreshing'), , check 1. refreshing state 2. detect whether contentoffset zeroed out.

- (void)scrollviewdidscroll:(uiscrollview *)scrollview{     //nslog(@"%f",[self.tableview contentoffset].y);     if(refreshing){         if([self.tableview contentoffset].y >= 0){             refreshing = no;             [self.refreshcontrol endrefreshing];          }     } } 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -