IOS UITableView Scrolling to the end triggering events

Source: Internet
Author: User

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]; }        }    }}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.