I'm working on a Swift project, using couple of ObjC libraries.
One of them is SWTableViewCell. My app's lists' cells inherit from SWTableViewCell, a subclass of UITableViewCell that adds swiping action on cells.
Libraries are added with cocoapods.
I want to import some Swift code into ObjC, within my main project. The project-Swift.h is being generated as it should (every Swift class inheriting from NSObject, annotated as @objc is being included), but it contains errors:
project-Swift.h:135:31: Cannot find interface declaration for 'SWTableViewCell', superclass of 'MySWTableViewCell'; did you mean 'UITableViewCell'?
How to remedy this situation?
I need the header to be generated properly in order to use Swift classes in ObjC
My goal is either to ignore these classes, or let XCode that it needs to import additional header during project-Swift.h
This should solve your problem:
#import "SWTableViewCell.h"If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With