I am using below code in one of my swift classes:
import UIKit
public class BRUFIMobile: NSObject {
public var mobileNumber : NSString?
public var provider : NSString?
public var aliasName: NSString?
public var aliasName_en : NSString?
@objc public var isDefault: Bool
public override init() {
self.isDefault = false
super.init()
}
}
My project contains both objective-c and swift codes. The code works fine on xCode 7 but now by updating to xCode 8 I get below error:
No setter method 'setIsDefault:' for assignment to property
I use the attribute in my objective-c code like below:
+ (BRUFIMobile *) convertUFIMobileToBRUFIMobile:(UFIMobile *) ufimobile
{
BRUFIMobile *brUFIMobile = [[BRUFIMobile alloc] init];
brUFIMobile.mobileNumber = ufimobile.number;
brUFIMobile.provider = ufimobile.provider;
brUFIMobile.aliasName = ufimobile.aliasName;
brUFIMobile.aliasName_en = ufimobile.aliasName_en;
brUFIMobile.isDefault = [ufimobile.isDefault boolValue];
return brUFIMobile;
}
is it now neccessary to define seetters manually?