-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UIGraphicsBeginImageContext Deprecated #984
Comments
将 替换为
|
如果不想像上面一样处理
|
…CGBitampContext: size={382, 0}. Use UIGraphicsImageRenderer to avoid this assert.
…CGBitampContext: size={382, 0}. Use UIGraphicsImageRenderer to avoid this assert.
…CGBitampContext: size={382, 0}. Use UIGraphicsImageRenderer to avoid this assert.
…CGBitampContext: size={382, 0}. Use UIGraphicsImageRenderer to avoid this assert.
…CGBitampContext: size={382, 0}. Use UIGraphicsImageRenderer to avoid this assert.
fix issue on ibireme#984
@implementation YYTextAsyncLayer(Hook)
It's better to do this |
Swift的话,采用上面一样的hook方法,在appdelegate方法中调用 YYTextAsyncLayer.swizzleDisplay `
} |
I do not want to change code in pods. so I create two classe. PPYYLabel, PPYYTextAsyncLayer . user PPYYLabel replace YYLabel
|
It seems like the master has retired from the scene for many years. It's unlikely that he will make a comeback again |
这个API还能继续用,只不过当layer的width或height 为0时会触发断言,否则不会。 |
最低支持iOS9的代码,得用这个~ |
大佬,我们这边使用了您的YYText,发现在iOS 17上运行会崩溃,触发了系统的断言:
UIGraphicsBeginImageContext() failed to allocate CGBitampContext: size={382, 0}, scale=3.000000, bitmapInfo=0x2002. Use UIGraphicsImageRenderer to avoid this assert.
查了下 api,发现UIGraphicsBeginImageContext在iOS 17上已经deprecated了,
大佬是否需要更新下
The text was updated successfully, but these errors were encountered: