Objective C Segmentation Fault when using "NO" value in NSDictionary -


why segmentation fault when using no value in nsdictionary?

you can put instances of objects in dictionary, set or array. primitive types not allowed, hence segmentation fault.

use nsnumber instead:

[ dict setobject: [ nsnumber numberwithbool: yourbool ] forkey: @"..." ]; 

Comments