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:
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
Post a Comment