Method Swizzling处理数组越界

static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
    [objc_getClass("__NSArrayI")
        swizzleMethod:@selector(objectAtIndex:)
        withMethod:@selector(cf_objectAtIndex:)];
});

你可能感兴趣的:(Method Swizzling处理数组越界)