简体   繁体   English

自我控制器0键/值对

[英]self controller 0 key/value pairs

I have a working controller, however when I debug it and try to see the values of the variables, self is empty like this. 我有一个正在工作的控制器,但是当我调试它并尝试查看变量的值时,self是空的,就像这样。 I tryed to clean project, restarted XCODE but nothing worked, any idea? 我试图清理项目,重新启动XCODE,但没有任何效果,知道吗?

在此处输入图片说明

我刚刚创建了另一个控制器,复制并粘贴了所有内容,它才起作用

initialize you variable in viewDidLoad. 在viewDidLoad中初始化变量。

for ex. 对于前。 if you have declared NSMutableArray in properties and haven't intialized them in viewDidLoad. 如果您已在属性中声明NSMutableArray,但尚未在viewDidLoad中初始化它们。 like this ieNSMutableArray a=[NSMutableArray alloc]init]; 像这样ieNSMutableArray a = [NSMutableArray alloc] init];

It may cause this problem. 这可能会导致此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM