We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
这个现象出现在我们的App第一次安装的时候,[UIApplication sharedApplication].windows 这个获取到的windows数组如下: <__NSArrayM 0x6000022bf9c0>( <UITextEffectsWindow: 0x7fe724227800; frame = (0 0; 414 896); opaque = NO; autoresize = W+H; layer = <UIWindowLayer: 0x600002c38ac0>>, <UIWindow: 0x7fe723f453b0; frame = (0 0; 414 896); autoresize = W+H; tintColor = UIExtendedSRGBColorSpace 0.117647 0.8 0.431373 1; gestureRecognizers = <NSArray: 0x600002259a40>; layer = <UIWindowLayer: 0x600002cbf3e0>>, <UITextEffectsWindow: 0x7fe725029a00; frame = (0 0; 414 896); layer = <UIWindowLayer: 0x600002c3e160>>, <UIRemoteKeyboardWindow: 0x7fe725107400; frame = (0 0; 414 896); opaque = NO; autoresize = W+H; layer = <UIWindowLayer: 0x600002c3e0e0>> ) 如果取第一个的话,弹窗就弹不出来,关闭App,重新打开App又好了,所以觉得 #define kCurrentWindow [[UIApplication sharedApplication].windows firstObject] 这行代码有问题,应该要判断下取到的是否是UIWindow,windowlevel是否为normal,我们这边能改,但是代码不好管理,希望你们能在下个版本解决下这个问题,辛苦了。
The text was updated successfully, but these errors were encountered:
用 keywindow吧
Sorry, something went wrong.
用 keywindow吧 大部分情况下用keywindow是可以的,但是如果取keywindow前系统有弹过窗(UIAlertView)并且没消失,此时取到的keywindow会是UIAlertControllerShimPresenterWindow,而不是UIWindow,所以是建议这样获取[[[UIApplication sharedApplication] delegate] window]
好提议
对呀 为什么不用 [[UIApplication sharedApplication] keyWindow]
No branches or pull requests
这个现象出现在我们的App第一次安装的时候,[UIApplication sharedApplication].windows 这个获取到的windows数组如下:
<__NSArrayM 0x6000022bf9c0>(
<UITextEffectsWindow: 0x7fe724227800; frame = (0 0; 414 896); opaque = NO; autoresize = W+H; layer = <UIWindowLayer: 0x600002c38ac0>>,
<UIWindow: 0x7fe723f453b0; frame = (0 0; 414 896); autoresize = W+H; tintColor = UIExtendedSRGBColorSpace 0.117647 0.8 0.431373 1; gestureRecognizers = <NSArray: 0x600002259a40>; layer = <UIWindowLayer: 0x600002cbf3e0>>,
<UITextEffectsWindow: 0x7fe725029a00; frame = (0 0; 414 896); layer = <UIWindowLayer: 0x600002c3e160>>,
<UIRemoteKeyboardWindow: 0x7fe725107400; frame = (0 0; 414 896); opaque = NO; autoresize = W+H; layer = <UIWindowLayer: 0x600002c3e0e0>>
)
如果取第一个的话,弹窗就弹不出来,关闭App,重新打开App又好了,所以觉得
#define kCurrentWindow [[UIApplication sharedApplication].windows firstObject]
这行代码有问题,应该要判断下取到的是否是UIWindow,windowlevel是否为normal,我们这边能改,但是代码不好管理,希望你们能在下个版本解决下这个问题,辛苦了。
The text was updated successfully, but these errors were encountered: