How do you differentiate private member variable in objective-c?
for private methods,
I could use
@interface MyClass(PrivateMetho开发者_如何学Gods)
- (void) _foo;
@end
How do you declare a private member variable in objective c?
http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ObjectiveC/Chapters/ocDefiningClasses.html#//apple_ref/doc/uid/TP30001163-CH12-TPXREF127
@interface MyClass : Superclass {
@private
NSString * privateString;
}
@end
You can declare it as follows..
@private //variable;
Check this question out. Question- private-instance-variable
精彩评论