Convert String to NSNumber iOS Swift



We cannot convert string directly to NSNumber.So we will convert string to Int then convert Int to NSNumber.

Code:
          NSNumber(value: Int("String")!)

Comments

Post a Comment

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

store cgpoint in userdefaults iOS swift