Under iOS development pull refresh and pull up load more
1. Introduction
Common implementation of pull-down refreshes
(1) Uirefreshcontrol
(2) Egotableviewrefresh
(3) Ah3dpullrefresh
(4) Mjrefresh
(5) Self-realization
Use of 2.uiscrollview+pullload2.1
Drop-down refresh:
Pull-up loads more:
2.2 Implementation
First step, first add UISCROLLVIEW+PULLLOAD.M to project, set UISCROLLVIEW+PULLLOAD.M file to non arc (join-FNO-OBJC-ARC)
Add a header file to a. m file that needs to add a drop-down refresh
#import "Uiscrollview+pullload.h"
The second step is to add drop-down refreshes and pull-up loads for the table view more
-(void ) pulldownloadend {_count = 1 ; _tableview.canpullup = YES; [Self startdownloaddata]; [_tableview Reloaddata]; [_tableview stoploadwithstate:pulldownloadstate];} -(void ) pulluploadend {_count + = 1 ; if (_count > 10 = NO; } [self startdownloaddata]; [_tableview Reloaddata]; [_tableview stoploadwithstate:pulluploadstate];}
* Caveats:
if (Self.interceptor.downView) // [Self.interceptor.downView setframe:cgrectmake (0, Self.contentSize.height, Self.frame.size.width,)]; [Self.interceptor.downView Setframe:cgrectmake (0300 )];
When implementing a pull-down load with this class, the view shown by default is the entire Self.view, which is:
[Self.interceptor.downView setframe:cgrectmake (0, Self.contentSize.height, Self.frame.size.width, 300)];
Need to read:
[Self.interceptor.downView setframe:cgrectmake (0, self.contentsize.height-140-64-49, Self.frame.size.width, 300-14 0-64-49)];
for the current program.
Under iOS development pull refresh and pull up load more