objective-c类里面的方法只有两种,静态方法和实例方法。在类里面声明一个私有方法
@interface Controller:NSObject
{
NSString *something;
}
+(void)thisIsAStaticMethod;
+(voi)thisIsAInstanceMethod;
@end
@interfae Controller(Private)
-(void)thisIsAPrivateMethod;
@end
@private可以用来修饰私有变量,在objective-c中,所有实例变量默认都是私有的,所有默认方法都是公有的