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

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift