I am trying to make a subclass of PDFKit's PDFView in my macOS application, which has legacy objective-c code as part of the project.
My swift class looks like this:
import Foundation
import Quartz
class customPDFView: PDFView
{
required init?(coder: NSCoder) {
super.init(coder: coder)
}
}
During the build I get an error in my 'projectName-Swift.h' file, which has created this:
SWIFT_CLASS("_TtC5NVivo13customPDFView")
@interface customPDFView : PDFView
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithFrame:(NSRect)frameRect SWIFT_UNAVAILABLE;
@end
The second line in the above code produces the error:
Cannot find interface declaration for 'PDFView', superclass of 'customPDFView'
Note: My 'projectName.h' file includes both lines @import Foundation
and @import Quartz
.
Any help would be greatly appreciated!