代码之家  ›  专栏  ›  技术社区  ›  Joey

在iOS 11上的imp\U实现中使用va\U列表,并阻止get EXC\U BAD\U访问

  •  0
  • Joey  · 技术社区  · 7 年前

    我将设备升级到iOS 11-beta6,然后发现运行时代码有问题。

    IMP swizzledImplementation = imp_implementationWithBlock(^BOOL(NSObject *obj, ...) { 
       va_list arguments;
       va_start(arguments, obj);
       id argument = va_arg(arguments, id);
       va_end(arguments);
    };
    

    va_列表有什么变化吗?还是imp_implementationWithBlock?

    1 回复  |  直到 7 年前
        1
  •  0
  •   Joey    7 年前