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

store cgpoint in userdefaults iOS swift

libc++abi: terminating due to uncaught exception of type NSException iOS swift