IOS Development Pull-down refresh and pull-up load more

Source: Internet
Author: User

IOS Development Pull-down refresh and pull-up load more introduction 1, common pull-down refresh implementation mode

(1) Uirefreshcontrol

(2) Egottableviewrefresh

(3) Ah3dpullrefresh

(4) Mjrefresh

(5) Self-realization

2, Ah3dpullrefresh implementation of the pull-down refresh and pull-up download steps
    1. Add uiscrollview+ah3dpullrefresh.h and uiscrollview+ah3dpullrefresh.m two files, so it is based on the Uiscrollview method.
    2. In buildphases compile sources find the AH3DPULLREFRESH.H, and click on it, found will pop up a dialog box, enter the following letters in the box-fno-objc-arc
    3. Add #improt to the header of the referenced file
    4. This method is a refresh method that references Setpulltorefreshhandler in the method. Another setpulltoloadmorehandler is the load method. The execution functions for loading and flushing are written in the block function body. You need to join refreshfinished or loadmorefinished in the body of the function you are executing after the data is loaded.
3, using the Cocoachaina website Refresh control, a section called Uiscrollview+pullload
  1. Import the file, #import "Uiscrollview+pullload.h"
  2. Add the Pulldelegate agent, and add the following code

    -(void) pulldownloadend {    ;     = YES;    [Self startdownloaddata];    [Table Reloaddata];    [Table Stoploadwithstate:pulldownloadstate];} -(void) pulluploadend {    ten;     if  + ) {        = NO;    }      [Self startdownloaddata];    [Table Reloaddata];    [Table Stoploadwithstate:pulluploadstate];}

    Note: This software is very simple to implement, but the effect is good, refresh the animation is not very well, there is a certain delay appear

Cocoachina website, Developer's code base, iOS development

IOS Development Pull-down refresh and pull-up load more

Related Article

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.