Just updated pods for xcode 9 and I\'m getting the error below for Cosmos.
Type \'NSAttributedStringKey\' (aka \'NSString\') has no member \'
let percentOff = NSMutableAttributedString(string: "\(productOff ?? "0")%OFF",
attributes: [NSFontAttributeName: UIFont(name: "Montserrat-Regular",
size: 13)!,NSForegroundColorAttributeName: UIColor.black,
NSBackgroundColorAttributeName: UIColor.black])
lblPriceDetail.attributedText = percentOff
This worked for me in swift 4.2
let label = UILabel()
label.font = UIFont.preferredFont(forTextStyle: .subheadline)
attributes: [NSFontAttributeName: label.font]
it's seem okay with swift 3.2 . i fixed with paging menu viewcontroller library.
Your pod might have a wrong swift version, not the project settings.
To change the pod swift setting, go in the file navigator (left of the screen) to Pods (blue icon) and select the pod you're having problems with. Then go to build settings and go to Swift Language version. Select Swift 4.
You must need to update swift version to 4.0 from Xcode.
Use below step
1) Choose Your Project from project manager (left top from Xcode)
2) Choose Build Settings
3) Search "Swift language"
4) Change "Swift Language Version " => Swift 4.0
In My case I replace This Code
[NSAttributedStringKey.font : font]
by Code Below
.size(attributes: [NSFontAttributeName : font])
Hope it Helps.