Objective c Can';在实例变量上不使用方法

Objective c Can';在实例变量上不使用方法,objective-c,foundation,Objective C,Foundation,为什么testVariableValues没有使用ObjectsAndKeys的方法字典 @property (nonatomic, strong) NSDictionary *testVariableValues; 我尝试使用这样的方法: [self.testVariableValues dictionaryWithObjectsAndKeys:......] 唯一可用的方法是[self.testVariableValues dictionaryWithValuesForKeys… 我不熟

为什么testVariableValues没有使用ObjectsAndKeys的方法字典

@property (nonatomic, strong) NSDictionary *testVariableValues;
我尝试使用这样的方法:

[self.testVariableValues dictionaryWithObjectsAndKeys:......]
唯一可用的方法是
[self.testVariableValues dictionaryWithValuesForKeys…


我不熟悉Objective C,对这个问题没有太多想法。与实例方法有关吗?

你把类方法和实例方法混为一谈了

你需要打电话

 self.testVariableValues = [NSDictionary dictionaryWithObjectsAndKeys:obj1, @"key1"..., nil].
希望有帮助