In the development process, in the use of UITableView always encountered loading more problems, in the end is the gesture to respond to waterfall flow good method?
Or add a bottom cell click Trigger to load more good? I also want to have my own judgment. But our boss always decides, no way, who told me to work for others?
Cell trigger slightly, this is very simple.
Below is how to respond to waterfall flow.
There are two types of operations: pull-up refresh and load-down. The key is to decide when to execute: Scroll to the top, scroll to the bottom
Give a method that I am doing now and have a better way to back it up.
- (void) Scrollviewdidenddragging: (Uiscrollview *) ScrollView willdecelerate: (BOOL) decelerate{if(NO) {}Else{cgpoint Offset1=Scrollview.contentoffset; CGRect bounds1=Scrollview.bounds; Cgsize size1=scrollview.contentsize; Uiedgeinsets Inset1=Scrollview.contentinset; floatY1 = offset1.y + Bounds1.size.height-Inset1.bottom; floatH1 =Size1.height; if(Y1 >tabView.frame.size.height) {flagshuaxin=YES; } Else if(Y1 <tabView.frame.size.height) {flagshuaxin=NO; } Else if(Y1 = =tabView.frame.size.height) {NSLog (@"%@", Flagshuaxin?@"Pull-up refresh":@"Drop-down refresh"); } if(flagshuaxin)//upload more {if(_refreshfooterview) {[_refreshfooterview Egorefreshscrollviewdidenddragging:scrollview]; } } }}