I'm using Core Data automatic NSManagedObject subclass generation, with a custom Class Definition. I want to update a non-managed property when a managed property value changes. So, I'm trying to use the override accessor enhancements from iOS 10.0 (https://developer.apple.com/library/archive/releasenotes/General/WhatNewCoreData2016/ReleaseNotes.html):
- (void)setDepartment:(Department *)value |
// invoke the dynamic implementation of setDepartment |
[self managedObjectOriginal_setDepartment:value]; |
NSLog(@"invoked %@", NSStringFromSelector(_cmd)); |
Problem is that my custom class is in Swift, so I'm at a loss on how to do this override. I've tried
managedObjectOriginal_setProperty(property)
But it gives me a compiler error. Is there any way to use this in Swift?