Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling reloadData() in didSelectDate() causes circle image to flicker. #475

Closed
gemmakbarlow opened this issue Nov 8, 2016 · 5 comments
Closed
Labels

Comments

@gemmakbarlow
Copy link
Contributor

gemmakbarlow commented Nov 8, 2016

A brief bug description.
Calling calendar.reloadData() in func calendar(_ calendar: FSCalendar, didSelect date: Date) { causes a flicker.

Integration method.
CocoaPods, though I don't believe this is relevant to this issue.

Full steps to reproduce
Add the following method to LoadViewExampleViewController.swift, in the SwiftExample.xcproj:

    func calendar(_ calendar: FSCalendar, didSelect date: Date) {
        calendar.reloadData()
    }

Device modal and iOS version.
Reproducible on the Simulator - iPhone 6S, iOS 10.1

Xcode version
I'm using Xcode 8.1 (8B62)

FSCalendar version
FSCalendar 2.5.0, installed via CocoaPods

Does this happen in the demo project? Which one? Or a link to another demo project.
Yes, this can be reproduced in the demo project, using the instructions above.


My request / recommendation would to be expose a method on FSCalendar to allow refreshing the underlying data for a particular date. When a new date is selected, I need to refresh the originally-set date (to draw a line under it) in addition to updating the look of the newly-selected cell.

Using reloadData() seems to be the only way to do this currently.

@WenchaoD
Copy link
Owner

WenchaoD commented Nov 8, 2016

Thanks for reporting @gemmakbarlow . This is indeed something. Will handle it ASAP.

@WenchaoD WenchaoD added the Fixed label Nov 9, 2016
@WenchaoD
Copy link
Owner

Fixed. Will push a new tag soon.

@gemmakbarlow
Copy link
Contributor Author

@WenchaoD This still seems to be reproducible in 2.5.1 using the instructions outlined above.

@WenchaoD
Copy link
Owner

Sorry. Use calendar.visibleCells as shown in DIY Example.

@gemmakbarlow
Copy link
Contributor Author

Ah - much nicer. Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants