First, no picture, no truth
Use third-party class libraries for pull-down refresh results
Odrefreshcontrol
Example directory structure:
Resources resource folder
Thirdpartlib third-party class library folder
Direct core callCodeThere are only six sentences in total, which are easy to use.
Set the position of the pull-down refresh
V_animateindicator * V = [[v_animateindicator alloc] initwithframe: cgrectmake (0. F,0. F,20. F,20. F)]; odrefreshcontrol* Refreshcontrol =[[Odrefreshcontrol alloc] initinscrollview: Self. ptv_main activityindicatorview: V]; [refreshcontrol addtarget: Self action: @ selector (role :) forcontrolevents: uicontroleventvaluechanged];
Method called after the pull-down refresh
-( void ) dropviewdidbeginrefreshing :( odrefreshcontrol * ) refreshcontrol { double delayinseconds = 3.0 ; dispatch_time_t poptime = dispatch_time (dispatch_time_now, delayinseconds * nsec_per_sec); dispatch_after (poptime, dispatch_get_main_queue (), ^ ( void ) { /// Start [self refreshcell]; /// end [refreshcontrol endrefreshing];});}
prj_pulldownrefresh.zip example code address: http://ishare.iask.sina.com.cn/f/34837888.html