graycampbell / GCCalendar

A customizable calendar view for iOS 9+ written in Swift.
https://graycampbell.github.io/GCCalendar
MIT License
56 stars 10 forks source link

Swift 3 support #22

Closed MustajabJafry closed 7 years ago

MustajabJafry commented 7 years ago

I am using Swift 3 and Xcode 8.2.1 and my pod version is 1.2.0

I am getting more than 150 errors around here. Most of them are support errors. Unavailable in swift 3. I cannot put every error but here are couple of screenshots.

screen shot 2017-03-11 at 2 01 51 pm

screen shot 2017-03-11 at 2 02 14 pm

graycampbell commented 7 years ago

21 Version 2.0.0 is written using Swift 3. I'm assuming you're using Version 1.1.3 or earlier since there isn't a Version 1.2.0. If you run pod update, GCCalendar should be updated to Version 2.0.0 in your project, and those errors should disappear.

Just so you know, Version 2.0.0 removes the GCCalendarViewController class in favor of using GCCalendarView and GCCalendarViewDelegate. This just means you'll have to use UIViewController and add an instance of GCCalendarView as a subview. Some general naming conventions have changed as well, so I encourage you to visit the documentation.

If you experience any problems implementing Version 2.0.0, please let me know.

MustajabJafry commented 7 years ago

Thank you for the response. When I run pod --version command I get this.

screen shot 2017-03-14 at 9 48 09 am

However, I will try after updating my pod version and will let you know in case of any problem.

graycampbell commented 7 years ago

Running pod --version tells you which version of CocoaPods you have installed, not which version of GCCalendar you're using.

Run pod outdated to see which pods you've installed are outdated. My guess is that you will see something like this:

- GCCalendar 1.1.3 -> 2.0.1 (latest version 2.0.1)

If you do see GCCalendar in the list of outdated pods, then running pod update GCCalendar should install Version 2.0.1 (which is compatible with Swift 3).

MustajabJafry commented 7 years ago

Thanks for the quick response. I will give it a try soon