Get bool value from NSdictionary returns wrong value

Problem:

If you tried to set the bool value to the dictionary and get the key value then it returns wrong value then follow the below steps.


Solution:

(dictionary.objectForKey("key") as? NSNumber)?.boolValue
 
It will return the correct value. 

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift