美文网首页
Super关键字调用

Super关键字调用

作者: 开发界小学生 | 来源:发表于2018-08-03 18:10 被阅读0次

    super

    struct objc_super{
           __unsafe_unretained _Nonnull id receiver;
          __unsafe_unretained _Nonnull id Class super_class;
    }
    [super  xxxx];
    转化
    struct objec_super = arg = {self,[self superclass]};
    objc_msgSendSuoer(arg,@selector(xxx));
    

    实际接收者还是 self

    [self class];
    [super class];
    

    都是用原类里面找class方法

    相关文章

      网友评论

          本文标题:Super关键字调用

          本文链接:https://www.haomeiwen.com/subject/beiyvftx.html