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

Why willDisplay cell is not called #607

Closed
dastanbb opened this issue Nov 1, 2017 · 4 comments
Closed

Why willDisplay cell is not called #607

dastanbb opened this issue Nov 1, 2017 · 4 comments
Assignees
Labels

Comments

@dastanbb
Copy link

dastanbb commented Nov 1, 2017

Hi!
First of all, thank you for the great UI component!
Version 7.1.1
I don't understand why willDisplay cell function is not called? In demo app it is mentioned that we should duplicate the code from cellForItemAt. Could you please explain this?
Regards,
Dastan

@patchthecode
Copy link
Owner

I explained it on this issue -> #553
Does this help ?

@patchthecode patchthecode self-assigned this Nov 1, 2017
@dastanbb
Copy link
Author

dastanbb commented Nov 1, 2017

Thank you! This explains pretty much everything.

@dastanbb dastanbb closed this as completed Nov 1, 2017
@patchthecode
Copy link
Owner

Also, here is when the function is called. In the rare case when the library needs updating.
If it is not implemented you will get this rare error -> #608

Cheers 🍻

@Mansi4481
Copy link

hi I have the same problem occurring. willDisplay is not getting called here

Version : 'JTAppleCalendar', '~> 7.1'
Code:

extension CalenderTimesheetVC: JTAppleCalendarViewDelegate {
public func calendar(_ calendar: JTAppleCalendarView, willDisplay cell: JTAppleCell, forItemAt date: Date, cellState: CellState, indexPath: IndexPath) {
let cell = cell as! DateCell
self.configureCell(view: cell, cellState: cellState)
}
func calendar(_ calendar: JTAppleCalendarView, cellForItemAt date: Date, cellState: CellState, indexPath: IndexPath) -> JTAppleCell {
let cell = calendar.dequeueReusableJTAppleCell(withReuseIdentifier: "dateCell", for: indexPath) as! DateCell
self.configureCell(view: cell, cellState: cellState)
return cell
}
}

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

3 participants