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

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift

Parse the value from string value iOS swift