Closed Argent closed 8 years ago
Subclass header files aren't supposed to be included with the main import <Bohr/Bohr.h>
statement, but individually through #import <Bohr/BOTableViewCell+Subclass.h>
or #import <Bohr/BOTextTableViewCell+Subclass.h>
. This is done so that no subclassing-related methods or properties are exposed directly, to be kept only as implementation details.
Thanks for your response.
Did you ever try that when using the library as a framework with carthage or a manual build? It works when I try to import the library with cocoapods, but when I use it in a carthage project, I get the following error when I add the import statement #import <Bohr/BOTableViewCell+Subclass.h
:
.../Carthage/Build/iOS/Bohr.framework/PrivateHeaders/BOTableViewCell+Subclass.h:9:9: error: 'BOTableViewCell.h' file not found
#import "BOTableViewCell.h"
Besides, importing a specific header file only works for objective-c files. It is not possible for swift projects, there you would need at least a objective-c bridging header.
I think if you want your library to be extendable through subclassing, all the relevant methods should be publicly exposed
You're totally right about the Swift part. Merging :+1:
In order to be able to subclass BO-Cells properly when using the library as a framework (like for example with Carthage), the subclass-header files have to be public and added to the
Bohr.h
fileChanges:
BOTableViewCell+Subclass.h
,BOTextTableViewCell+Subclass.h
andBOSetting.h
to publicBOTableViewCell+Subclass.h
andBOTextTableViewCell+Subclass.h
toBohr.h