OC类方法关于self的说明

来源:互联网 发布:智能电视视频点播软件 编辑:程序博客网 时间:2024/05/20 05:54
@implementation Person-(id) initWithAge:(int)_age identify:(int) _identify{    if (self = [super init]) {            age = _age;            identify = _identify;    }    return self;}@end
其中,self = [super init]指的是父类初始化成功返回给self
0 0
原创粉丝点击