So, I\'m new to iOS and have been using online tutorials to learn the platform. The tutorials I\'m using are building apps with iOS 9 while I\'m using iOS 10. Because of that I
With the help of a couple of users and some added searching, I was able to figure out the cause of my problem.
Per the suggestion of the previously mentioned users, I added the NSCoding
protocol to my CalendarEvent
class.
class CalendarEvent : NSObject, NSCoding {
....
}
Unfortunately, that didn't completely fix the issue, but it was a start. A few errors and a quick search showed me that I had to change this:
init(withCoder coder : NSCoder){
....
}
func encodeWithCoder(coder : NSCoder){
....
}
to this:
required init(coder : NSCoder) {
....
}
func encode(with aCoder : NSCoder) {
....
}
After making those changes, my code ran perfectly fine.