开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜