JTAppleCalendar: Type 'ViewController' does not conform to protocol 'JTAppleCalendarViewDelegate'
IMPORTANT - BEFORE CREATING YOUR ISSUE PLEASE READ THE FOLLOWING:
- PLEASE STATE THE VERSION NUMBER you are using.
I am using XCode 9.2.
- Are you using the latest version of JTAppleCalendar? Latest version is currently 7.1.5
Yes I am.
- PROVIDE ENOUGH INFORMATION SO I CAN RECREATE THE PROBLEM.
my issue happens when me following the tutorial and before finishing the calendar view I get this error when it says “Type ‘ViewController’ does not conform to protocol ‘JTAppleCalendarViewDelegate’”.
Since XCode 9 suggests fixing the issue. I pressed on fix and all what it did was that it created for me this function
func calendar(_ calendar: JTAppleCalendarView, willDisplay cell: JTAppleCell, forItemAt date: Date, cellState: CellState, indexPath: IndexPath) { <#code#> }
and it keeps the one that I have which is this
func calendar(_ calendar: JTAppleCalendarView, cellForItemAt date: Date, cellState: CellState, indexPath: IndexPath) -> JTAppleCell { let cell = calendar.dequeueReusableJTAppleCell(withReuseIdentifier: "CustomCell", for: indexPath) as! CustomCell cell.dateLabel.text = cellState.text return cell }
When I add this function without adding any code to it. I dont get the error but then when I run the project i only see a blank page app.
and couple of seconds after building I get this error.
Any suggestions on what my mistake could be.
Thank you and appreciate your help
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (6 by maintainers)
And for me I can’t even run the app. It gets stuck on this error keeps on adding the same function and if the function is added twice invalid redeclaration error will come
Because if this is the function that this XCode suggested, then --> i give up… I do not know how to state it any more.
Here is a screen shot of the bold text letters of the instructions on this project’s main page
I had to put it in maximum bold text because for some reason, no one reads it.
I have the same issue! Since they aren’t showing you the code I guess I’ll just go ahead and show you the error! so this picture has the Xcode suggestion included! the error does go away but the project doesn’t compile in Xcode.