标签: iphone objective-c private member
用于私人方法,
我可以用
@interface MyClass(PrivateMethods) - (void) _foo; @end
如何在目标c中声明私有成员变量?
答案 0 :(得分:0)
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
答案 1 :(得分:0)
您可以按如下方式声明..
@private //variable;
检查这个问题。 Question- private-instance-variable