/// 模拟器上报错,真机运行无误
/// 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
网友评论