The MJRefresh drop-down data loading bug
When there is no more data, NoMoreData is displayed. In my understanding, the refresh is ended first and no more data is displayed.
I haven't posted any code before today.
[Self. collectionView reloadData]; [self. collectionView. mj_header endRefreshing]; // end refresh [self. collectionView. mj_footer endRefreshing]; NSArray * arr = data [@ "Json"]; if (arr. count = 0) {// no more [self. collectionView. mj_footer endRefreshingWithNoMoreData];}
Today, a bug exists. When endRefreshingWithNoMoreData is pulled down and loaded again, it still enters the refresh status. After a long time, the Code is modified.
[Self. collectionView reloadData]; [self. collectionView. mj_header endRefreshing]; // [self. collectionView. mj_footer endRefreshing]; NSArray * arr = data [@ "Json"]; // you can determine if (arr. count = 0) {[self. collectionView. mj_footer endRefreshingWithNoMoreData];} else {[self. collectionView. mj_footer endRefreshing];}
In fact, the page Jump today has been processed.
NAVC. modalPresentationStyle = UIModalPresentationOverCurrentContext; // The Root View Controller must be set transparently.
I tried the previous Code and found that there was still no problem, but today's bug was not accidental, and even if I got rid of the jump method, it still didn't work.
At the end of the load, the MJRefresh refresh control displays a downward offset.
The bug detected by Axi Ba Pu can only be solved in this way. Record it. Maybe it will be terrible to see it later.