The MJRefresh drop-down data loading bug

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.