First, the use of Apple native method
1. Drop-down Refresh
2, Pull up refresh
(1 first to create a new footer Xib file, of course, including the corresponding controller files, such as in the Xib file can be dragged as follows the corresponding control
(2 Then write an instance method in the code file
+ (instancetype) footer
{
return [[[nsbundle mainbundle] loadnibnamed: @ "xib file name" Owner:nil Options:nil] Lastobject];
}
(3 is then called in our list controller:
/**
* Integrated pull-up refresh control
*/
-(void) refreshupstatedatelist
{
Xbloadmorefooter *footer = [xbloadmorefooter footer];
Footer.hidden = YES; //It was to be hidden at first, and we just put it out when ScrollView dragged it to the bottom.
self.tableView.tableFooterView = footer; //actually is equivalent to the Xib file as a tableview footer
}
(4 pull up to the bottom to call the method of refreshing more data
Second, the use of third-party library Mjrefresh
1. Drop-down Refresh
Abide by the agreement: <MJREFRESHBASEVIEWDELEGATE> and then actually use it as the header of the table view.
2. Drop-down Refresh
3, need to note: finally need dealloc
Two methods for pull-up and drop-down refreshes (including using third-party libraries Mjrefresh)