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.
如果我在 xcode 4 代码完成中使用点符号对我不起作用(按 ESC):
NSString *s = @"demo"; NSLog(@"%lu", [s length]); //[s <ESC> code completion works fine NSLog(@"%lu", s.length); //s.<ESC> code completion doesn't work
??
确保该属性定义了有效的 @property 访问器。
// 在.h
@property (assign) int 长度;
// 在.m
@synthesize 长度;
请记住,您可以拥有自己的访问器和设置器,但我认为代码感知需要 @property 来显示点符号。