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)