[英]invalid ObjC Object error in Xcode while debugging
As in screenshot, the debugger has last two object named [0]
which is my two NSString *variables.. 如屏幕截图所示,调试器的最后两个对象名为[0]
,这是我的两个NSString *变量。
Both variable can not be assigned.. (i have initialised both..) 这两个变量都不能分配..(我已经初始化了两个..)
inquiryId=[NSString stringWithFormat:@"%@",[dictObj objectForKey:@"inquiry_id"]];
I am assigning from dictionary but it stays [0]
我正在从字典中分配,但仍保持[0]
when i print the variable in log then it display as shown in image 当我在日志中打印变量时,它将如图所示
I dont know which type of error is this..!! 我不知道这是哪种错误.. !!
可能是因为您正在将对象分配给NSString,请尝试以下代码:
inquiryId=[NSString stringWithFormat:@"%@",[dictObj valueForKey:@"inquiry_id"]];
I got solution on this issue.!!! 我在这个问题上得到了解决方案。
I just Remove reference
of My Viewcontroller
& add it again... 我只是Remove reference
My Viewcontroller
Remove reference
并再次添加...
That problem was related to something linking issue.!! 这个问题与链接问题有关!!
It works now..!! 现在可以用了!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.