Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个非常奇怪的问题。我定义了两个类:A和B,在B中,它有一个成员变量NSArray bullets,在A中,它有一个成员变量B b,现在在A的一个函数中,我试图访问b .bullets,但它告诉我“子弹在...的类型上找不到”,我在 Bh 中写了“@property bullets”,在 Bm 中写了“@synthesize bullets=_bullets”,任何帮助对我来说都是以前的,谢谢
@property bullets;是不足够的。
@property bullets;
这将告诉您您需要了解的有关属性的所有信息。
引用,这是正确的语法:
@property (attributes) type name;