问题
if i use dot notation in xcode 4 code completion doesn't work for me (pressing 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
??
回答1:
Make sure that the property has a valid @property accessor defined.
// in .h
@property (assign) int length;
// in .m
@synthesize length;
Keep in mind you can have your own accessors and setters, but I think code-sense needs @property to show up the dot notation.
来源:https://stackoverflow.com/questions/6315080/xcode-4-dot-notation-code-sense-problem