ObjObject *ob1 = [[ObjObject alloc] init];
[ob1 prientObject:@"S1"];
ObjObject *ob2 = [[ObjObject alloc] init];
[ob2 prientObject:@"S2"];
#pragm mark ObjObject
#import@interface ObjObject : NSObject
-(void)prientObject:(NSString *)s;
@end
#import "ObjObject.h"
@implementation ObjObject
static int k;
-(void)prientObject:(NSString *)s
{
NSLog(@"%@",self);
[self logObject];
}
-(void)logObject
{
k++;
NSLog(@"ppp %d",k);
}
@end
#pragm mark log
self 分别代表
self == ob1
self == ob2 表示对象 - 号方法
相信好多人 都认为 self 就是简简单单说当前类的解释。。。。。。个人感觉有错误,不完美哎哎。。。