CCBottomRefreshControl icon indicating copy to clipboard operation
CCBottomRefreshControl copied to clipboard

The refresh icon does not disappear sometimes

Open joe528 opened this issue 8 years ago • 10 comments

Sometimes I found the app has the refresh icon at the bottom when I scroll up. It will not disappear until I scroll down to bottom again to refresh it.

If I try to reproduce it "deliberately", I can never reproduce it.

But it does happen from time to time. I have seen it several times in the past few days.

Rarely seen but it happens time to time to give weird user experience.

joe528 avatar Mar 02 '16 08:03 joe528

Did you find a solution for this issue?

abereghici avatar Apr 08 '16 09:04 abereghici

No. Did you reproduce the same issue?

joe528 avatar Apr 08 '16 11:04 joe528

Yes. I didn't find how to fix this issue in library, but I found another solution :

override func viewDidAppear(animated: Bool) {
        self.tableView.bottomRefreshControl = self.bottomRefreshControl
        self.bottomRefreshControl.beginRefreshing()
        self.bottomRefreshControl.endRefreshing()
    }
override func viewDidDisappear(animated: Bool) {
        self.tableView.bottomRefreshControl = nil
    }

abereghici avatar Apr 08 '16 11:04 abereghici

@abereghici nil it in viewDidDisappear is not helping for me because it means the end of my app.

joe528 avatar Apr 09 '16 00:04 joe528

@joe528 Try this :

override func viewDidAppear(animated: Bool) {
        self.bottomRefreshControl.beginRefreshing()
        self.bottomRefreshControl.endRefreshing()
    }

abereghici avatar Apr 25 '16 10:04 abereghici

Why would calling these two functions in viewDidAppear resolve my issue? I don't get it. The issue happens when I scroll up at the bottom of a table view. Most times, the refresh icon will disappear as designed, and only in rare condition, the refresh icon does not disappear.

joe528 avatar Apr 25 '16 10:04 joe528

@joe528 Oh, okay. I didn't understand right your question. This piece of code is working when you have 2 controllers, and when you navigate back, refresh controller appears on bottom of the screen.

abereghici avatar Apr 25 '16 10:04 abereghici

I think I had the same issue. Changing if (offset > 0) into if (offset >= 0) inside - (void)brc_setContentOffset:(CGPoint)contentOffset seems to fix the issue.

joonorbertsv avatar Jun 09 '16 13:06 joonorbertsv

@joonorbertsv thanks for the suggestion, I will give it a try and observe it for a while to see if I will never see this issue again (because I can't reproduce it "deliberately")

joe528 avatar Jul 15 '16 16:07 joe528

I have the same issue. This helped me

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    self.tableView.bottomRefreshControl = nil;
}

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    self.tableView.bottomRefreshControl = self.bottomRefreshControl;
}

JustSAT avatar Feb 01 '17 13:02 JustSAT