Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use of unresolved identifier 'NSFontAttributeName' [duplicate]

I migrated my code from swift 3.3 to 4.1 And I'm getting this error. How can i fix this ? Any advice ?

progressView.titleLabelAttributedText = NSAttributedString(string: MyxStrings.sharedInstance.SENDING, attributes: [NSFontAttributeName: Scully.sharedInstance.APP_REGULAR_FONT_SMALL!])
like image 842
podgradle Avatar asked Jan 28 '23 02:01

podgradle


1 Answers

Just use like this NSAttributedStringKey is an enum

progressView.titleLabelAttributedText = NSAttributedString(string: MyxStrings.sharedInstance.SENDING, attributes: [NSAttributedStringKey.font : Scully.sharedInstance.APP_REGULAR_FONT_SMALL]?) 
like image 51
Abdelahad Darwish Avatar answered Feb 13 '23 05:02

Abdelahad Darwish