I want add a Swift class in my Objective-C project.
I using bridging header to access Swift class.
But I can not find some property in Swift class.
Sample Swift Code:
@objc class Swift: NSObject {
var name: String!
var index: Int!
required init(name: String, index: Int)
{
self.name = name;
self.index = index;
}
}
Code in Bridging Header:
@interface Swift : NSObject
@property (nonatomic, copy) NSString * name;
- (instancetype)initWithName:(NSString *)name index:(NSInteger)index OBJC_DESIGNATED_INITIALIZER;
@end
That property "index" is missing.
How can i change code to access the missing property?