my app crashing when try set value in nsmutabledictionary.
here code below demostrate crash, not able find out crash log in console.
nsarray *b =[[a objectatindex:1] valueforkey:@"value"]; nsmutabledictionary *b1 =[b objectatindex:0]; nsstring *str = self.tes; [b1 setvalue:str forkey:@"value"]; please me regarding this.
b1 dictionary log
{ question = "vale"; type = a; }
setvalue:forkey: part of nskeyvaluecoding protocol, among other things, lets access object properties likes of interface builder. setvalue:forkey: implemented in classes other nsdictionary.
setobject:forkey: nsmutabledictionary's reason exist. signature happens quite similar setvalue:forkey:, more generic (e.g. key type).
so in case replace setvalue:forkey setobject:forkey , valueforkey: objectforkey:
--
Comments
Post a Comment