How to write an extension for NSFetchedResultsController in Swift 4

前端 未结 3 1346
有刺的猬
有刺的猬 2021-01-12 05:45

I\'m trying to write a simple extension to the NSFetchedResultsController class in Swift 4.

Here\'s my first attempt - which worked in Swift 3:

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-12 05:59

    I think I found the answer to this one. The function needs to be available to Objective-C.

    Adding @objc to the func should remove the compile error. At least it did for me!

提交回复
热议问题