Convert NsNumber, NSDate to String in iOS Swift

Code:


String(describing: nsnumbervalue)
   
     (or)

String(nsnumbervalue)


The above code is used to convert the NsNumber to String. 


NSDate To String

String(describing: Date)



Combine NsNumber and string to String

Code:

String("\(nsnumbervalue) km")


Convert Float to String 
Code:

String(describing: floatvalue)





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