Using Swift classes inherited from Objective C library code in Objective C code
I am working on a Swift project using a couple of ObjC libraries. One of them is SWTableViewCell . My app list box cells inherit from SWTableViewCell
, a subclass UITableViewCell
that adds swiping action to cells.
Libraries are added using cocoapods.
I want to import Swift code into ObjC in my main project. project-Swift.h
is generated as it should (every Swift class inheriting from NSObject, annotated as @objc, included), but it contains errors:
project-Swift.h:135:31: Cannot find interface declaration for 'SWTableViewCell', superclass of 'MySWTableViewCell'; did you mean 'UITableViewCell'?
How do I fix this situation? I need a header that will be generated correctly in order to use the Swift classes in ObjC My goal is to either ignore these classes or let Xcode that it needs to import an additional header duringproject-Swift.h
source to share