I've got a big problem !
I try to use a Swift property in ObjC++ class but nothing works !
My Swift Class :
let wST:CGFloat = 200
@objc class G: NSObject {
private override init() {}
class func sizeST() -> CGSize { return CGSize(width: wST, height: 200)}
// Another test
static var hST:CGFloat = 200
}
In ObjC++ class .h :
@class G;
In ObjC++ class .mm :
#import "PROJECT-Swift.h"
...
- (id)initWithFrame:(CGRect)frame {
NSLog(@"Property : %@", [G sizeST]);
// With static var
NSLog(@"Property : %f", G.hST);
}
What's wrong ? Thanks for your help...