Bad Exec Error...
I'm getting a EXC_BAD_ACCESS error when trying to set the delegate to my controller
I also don't see JTAppleCalendar as one of the choices on the Class Inspector. I see the classes in the attached screenshot.
Am I doing something wrong? Using latest Xcode.

Here's a screen shot of the error:
Oddly enough, when I implement my code as in the example (with the calendar delegates in an extension) it works.
Why would it not work with the view controller directly implementing the delegate classes for the calendar?
Ok, i am trying to understand your problem.
I just took the same project attached here on github. I removed the extension and set everything up in the ViewController like so:
class ViewController: UIViewController, JTAppleCalendarViewDataSource, JTAppleCalendarViewDelegate {
...
}
Then i moved all the functions that was in the extension, into the viewController just like you did.
And when i run the app, it works. So try and help me understand where your problem is:
- What version of the framework are you using?
- Are you installing it using cocoapods? or something else.
If you are using the latest version and you are using cocoapods to install the calendar. Then...
- did you look at the quick tutorial on how to set it up?
You have correctly imported JTAppleCalendar in your viewController class.
But, on your interface builder file (as shown in the tutorial), your calendarView should be a subclass of JTAppleCalendarView
Here's what I did.
- installed using cocoapods
- followed the tutorial in the documentation
- had everything in my view controller class (did not use an extension)
- I thought I had all the class types properly set
Crashed as shown in screens.
Changed the source/delegate to be in an extension exactly as in the tutorial. Everything worked. Chuck
I just did what you said. And it works. So here's what, can you upload a bugged copy of your project on github so that i can take a look?
I can do that tomorrow.
Chuck
Alright. I will appreciate it. Thanks. Upload it once you are able to do so
Ok, now it works without the extension, so I can only conclude that I was doing something else wrong.
Chuck
On Mon, May 23, 2016 at 11:01 PM, JTAppleCalendar [email protected] wrote:
Alright. I will appreciate it. Thanks. Upload it once you are able to do so
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/patchthecode/JTAppleCalendar/issues/23#issuecomment-221154413
Chuck
Ok thanks. Closing this issue. Have a good one
I got the same thread error at runtime. I followed the tutorial and did not get any errors until testing.
@yillivs Ok first, create a new issue.
Then can you upload a copy of your bugged project there? I want to take a look at it And can you tell me which part of the code you are experiencing the problem? Do this on the newly created issue