objective-c声明私有方法

来源:互联网 发布:剑网3重制版继承数据不 编辑:程序博客网 时间:2024/05/16 04:54

@interfaceController : NSObject 


NSString *something; 

+ (void)thisIsAStaticMethod; 
- (void)thisIsAnInstanceMethod; 

@end 
//声明私有的方法 
@interface Controller (Private) 
- (void)thisIsAPrivateMethod; 
@end

///////////////////////////
objective-c中变量为私有,通过@property来设置变量的get、set方法;函数默认为public。
原创粉丝点击