YBImageBrowser icon indicating copy to clipboard operation
YBImageBrowser copied to clipboard

Xcode 15 iOS17 Crash

Open MrChen88088 opened this issue 2 years ago • 3 comments

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIGraphicsBeginImageContext() failed to allocate CGBitampContext: size={0, 0}, scale=3.000000, bitmapInfo=0x2006. Use UIGraphicsImageRenderer to avoid this assert.'

_UIGraphicsBeginImageContextWithOptions 方法被弃用,麻烦作者可以更新一下吗?

MrChen88088 avatar Jan 05 '24 07:01 MrChen88088

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIGraphicsBeginImageContext() failed to allocate CGBitampContext: size={0, 0}, scale=3.000000, bitmapInfo=0x2006. Use UIGraphicsImageRenderer to avoid this assert.'

_UIGraphicsBeginImageContextWithOptions 方法被弃用,麻烦作者可以更新一下吗?

可以试一下这个方法,参考这篇: https://www.jianshu.com/p/aeb0b9129fcd UIGraphicsImageRenderer *re = [[UIGraphicsImageRenderer alloc]initWithSize:view.bounds.size]; UIImage *image = [re imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) {

}]; return image;

ngng1024GH avatar Feb 06 '24 06:02 ngng1024GH

这一篇更详细一点,可能需要自己去做修改了 https://blog.csdn.net/weixin_42050662/article/details/134524136

ngng1024GH avatar Feb 06 '24 06:02 ngng1024GH

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIGraphicsBeginImageContext() failed to allocate CGBitampContext: size={0, 0}, scale=3.000000, bitmapInfo=0x2006. Use UIGraphicsImageRenderer to avoid this assert.' _UIGraphicsBeginImageContextWithOptions 方法被弃用,麻烦作者可以更新一下吗?

可以试一下这个方法,参考这篇: https://www.jianshu.com/p/aeb0b9129fcd UIGraphicsImageRenderer *re = [[UIGraphicsImageRenderer alloc]initWithSize:view.bounds.size]; UIImage *image = [re imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) {

}]; return image;

感谢,有效,作者快快更新~

frankkly avatar Feb 26 '24 06:02 frankkly