#import <Foundation/Foundation.h>
/**
* 1.给私有方法的名称加上前缀,这样容易和公共方法区别开
* 2.不要单用一个下划线做私有方法的前缀,因为这种做法是预留给苹果公司的
*/
@interface EOCObject : NSObject
+(void)classPublicMethod;
-(void)pulicMethod;
@end
#import "EOCObject.h"
@implementation EOCObject
+(void)classPublicMethod
{
}
-(void)pulicMethod
{
EOCObject *obj = [EOCObject new];
[obj p_privateMethod];
}
-(void)p_privateMethod
{
}
@end
转载于:https://my.oschina.net/u/2319073/blog/617882