I encountered a problem when access swift class in objective-c, stored properties in swift cannot be converted to properties in objective-c, such as:
var maxFixedWidth:Float? = defaultMaxWidth {
didSet{
self.invalidateIntrinsicContentSize()
self.setNeedsUpdateConstraints()
}
}
var itemSpace:Float? = 4 {
didSet{
self.invalidateIntrinsicContentSize()
self.setNeedsUpdateConstraints()
}
}
These cannot be converted to the following objective-c style properties that should be contained in #import "JDStock-swift.h"
,
@property (nonatomic, assign) CGFloat maxFixedWidth;
and
@property (nonatomic, assign) CGFloat itemSpace;
It puzzled me for a long time, appreciate for your answers, waiting for you all the time with patient, Thanks!