-
Notifications
You must be signed in to change notification settings - Fork 240
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
当UIWindow不在第一个位置的时候,弹窗弹不出来 #31
Comments
用 |
|
好提议 |
对呀 为什么不用 [[UIApplication sharedApplication] keyWindow] |
这个现象出现在我们的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: