iOS development--common techniques (Mjrefresh detailed)

Source: Internet
Author: User

Reprint of MJ's original address Https://github.com/CoderMJLee/MJRefresh drop-down refresh 01-default
headerwithrefreshingblock:^{   //Enter the refresh state to automatically call this block}]; or headerwithrefreshingtarget:  Refreshingaction:@selector (loadnewdata)];  Immediately enter the refresh status [beginrefreshing];      

drop-Down Refresh 02-animated pictures
Headerwithrefreshingtarget:refreshingaction:@selector (loadnewdata)];  Forstate:mjrefreshstateidle]; forstate:mjrefreshstatepulling]; forstate:mjrefreshstaterefreshing]; //Set headerself.tableView.mj_header = header;      

Drop-Down Refresh 03-Hidden time
YES;

drop-down Refresh 04-Hide status and time
YES;  YES;

Drop-Down Refresh 05-Custom text
Set text [HeaderSettitle:@ "Pull down to refresh[ Forstate:mjrefreshstateidle]; [Header Settitle:@ "Release to refresh" forstate:mjrefreshstatepulling];[ Header Settitle:@ "Loading ... [ forstate:mjrefreshstaterefreshing]; //Set Font header.stateLabel.font = [Uifont systemfontofsize:15];header.lastupdatedtimelabel.font = [ Uifont systemfontofsize: +];  Set color Header.stateLabel.textColor = [Uicolor redcolor];header.lastupdatedtimelabel.textcolor = [Uicolor  Bluecolor];                 

drop-Down Refresh 06-Custom Refresh Control
Headerwithrefreshingtarget:refreshingaction:@selector (loadnewdata)];  Specific implementations reference MJDIYHeader.h and MJDIYHEADER.M   

Pull-Up Refresh 01-Default
footerwithrefreshingblock:^{   //Enter the refresh state to automatically call this block}]; or footerwithrefreshingtarget:  Refreshingaction:@selector (loadmoredata)];    

Pull-Up Refresh 02-animated pictures
Footerwithrefreshingtarget:refreshingaction:@selector (loadmoredata)];  Forstate:mjrefreshstaterefreshing]; //Set tail self.tableView.mj_footer = footer;    

Pull up Refresh 03-Hide the text of the refresh status
YES; //If there is no method above, use Footer.stateLabel.hidden = YES;

Pull-Up Refresh 04-Full load Complete
Endrefreshingwithnomoredata];

Pull up Refresh 05-Custom text
Settitle:@ "Click or drag up to refreshsettitle:@" Loading more ... settitle:@ "No more dataforstate:mjrefreshstatenomoredata";  Systemfontofsize:17]; Bluecolor];        

Pull-Up Refresh 06-Hide after Load
YES;

Pull-Up Refresh 07-Auto Rebound pull-up 01
Footerwithrefreshingtarget:refreshingaction:@selector (loadmoredata)];  

Pull-Up Refresh 08-auto Rebound pull-up 02
Footerwithrefreshingtarget:refreshingaction:@selector (loadmoredata)];  Forstate:mjrefreshstateidle]; forstate:mjrefreshstatepulling]; forstate:mjrefreshstaterefreshing]; //Set tail self.tableView.mj_footer = footer;      

Pull-Up Refresh 09-Custom Refresh control (auto refresh)
Footerwithrefreshingtarget:refreshingaction:@selector (loadmoredata)];  Specific implementations reference MJDIYAutoFooter.h and MJDIYAUTOFOOTER.M   

Pull-Up Refresh 10-Custom Refresh control (auto Rebound)
Footerwithrefreshingtarget:refreshingaction:@selector (loadmoredata)];  Specific implementations reference MJDIYBackFooter.h and MJDIYBACKFOOTER.M   

uicollectionview01-Up/Down Refresh
headerwithrefreshingblock:^{   //Enter the refresh state will automatically call this block}];  footerwithrefreshingblock:^{   //Enter the refresh state will automatically call this block}];  

uiwebview01-drop-down refresh
headerwithrefreshingblock:^{   //Enter the refresh state will automatically call this block}];

Remind
    • This frame pure arc, compatible system >=ios6.0, Iphone\ipad screen
    • Reference URL: http://blog.sina.com.cn/s/blog_13f198ad50102wiqo.html

iOS development--common techniques (Mjrefresh detailed)

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.