我正在测试是否已经设置了属性.我知道用我拥有的物品:
CGRect ppGoalFrame;
LocalPlaySetup *localPlaySetup;
我可以测试
if (localPlaySetup == nil)
但是如果我try 用==nil或==NULL测试CGRect
if (ppGoalFrame == nil)
我明白了
invalid operands to binary == (have 'CGRect' and 'void *')
So is the CGRect
"void", null, nil...? before it's set? Obviously I can't compare CGrect to a void pointer (I can't use ppGoalFrame == void
); is there another way to test this? The Objective-C so far is pretty easy to understand but as soon as the C looms, 我明白了 a bit lost.