-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
为什么在 iOS 13 系统中显示在左上角???????????? #1043
Comments
同问!!! |
iOS13多了一个SceneDelegate类,导致获取不到window了 |
在源码SVProgressHUD.m文件中第638行self.frame = [[[UIApplication sharedApplication] delegate] window].bounds这句改成 |
改了还是不行:
#if !defined(SV_APP_EXTENSIONS) && TARGET_OS_IOS 字号不一样行数不一样,建议直接说方法名 |
就是这里,我这边这样修改之后就没有问题了,不知道你这个为什么不行。目前只找到了这个解决办法 |
你可以在这里打断点调试 如果self.frame有值,那就不是这个问题了,可能是其他问题。或者你直接给frame一个固定值试试 |
CGRectMake设置frame系统就不走那个方法了。。不知道为啥 |
我也遇到了同样的问题啊,醉了。。。。 |
到现在也没解决这个问题。。忍痛不用sv了。。好可惜 |
XCode 11 & iOS 13+ ,add code: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions. |
Yes, the huge problem remains |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions. |
同样碰到,神坑 |
You can add this in the AppDelegate. It works well. var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
self.window = UIWindow(frame: UIScreen.main.bounds)
return true
} This issue is caused by Window. |
Thank you, this save my day! |
I've updated the component and addressed several bugs. Please review version 2.3.0, and should you find any remaining issues, your feedback would be greatly valued. |
why?
没有加这句还会闪退: @Property (strong, nonatomic) UIWindow *window;
The text was updated successfully, but these errors were encountered: