4

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!])
podgradle
  • 336
  • 1
  • 10
  • 17
  • please check this url. https://stackoverflow.com/questions/44641877/nsattributedstringkey-giving-an-unresolved-identifier-error – aBilal17 May 16 '18 at 06:55

1 Answers1

8

Just use like this NSAttributedStringKey is an enum

progressView.titleLabelAttributedText = NSAttributedString(string: MyxStrings.sharedInstance.SENDING, attributes: [NSAttributedStringKey.font : Scully.sharedInstance.APP_REGULAR_FONT_SMALL]?) 
Abdelahad Darwish
  • 5,969
  • 1
  • 17
  • 35