this question has answer here:
- what's difference between using obj-c accessors , using dot syntax? 3 answers
- objective-c property access 2 answers
- difference between self.var , var 3 answers
as title explained, if control drag component in xib file towards .h file conveniently create outlet, doublepicker
or else, xcode create statement in viewdidunloaded:
method this:
[self setdoublepicker:nil];
what difference between and:
self.doublepicker = nil;
which 1 performs better?
foo *foo = [[foo alloc] init]; foo.bar = yes; [foo setbar:yes];
the last 2 lines compile same. thing changes if property has getter and/or setter attribute specified; however, change message gets sent, not whether message sent:
if ([someview isempty]) { /* ... */ } if (someview.empty) { /* ... */ }
both lines gives same result. . once refere 1 better understanding dot notation.
Comments
Post a Comment