objc_msgSend exc_bad_access(code=exc_i386_gpflt)

/// 模拟器上报错,真机运行无误
/// Error: exc_bad_access(code=exc_i386_gpflt)
((UIEdgeInsets (*)(Class, SEL, id))objc_msgSend)(class, @selector(insetForContent:), content);

/// 改为
#ifdef __arm64__
    return ((UIEdgeInsets (*)(Class, SEL, id))objc_msgSend)(class, @selector(insetForContent:), content);
#else
    return ((UIEdgeInsets (*)(Class, SEL, id))objc_msgSend_stret)(class, @selector(insetForContent:), content);
#endif

参考

你可能感兴趣的:(objc_msgSend exc_bad_access(code=exc_i386_gpflt))