iOS开发 SVProgressHUD 在iOS13之后显示到左

2023-09-11  本文已影响0人  林希品

在源码SVProgressHUD.m文件中找到这个方法 positionHUD

- (void)positionHUD:(NSNotification*)notification {
    ......
    self.frame = [[[UIApplication sharedApplication] delegate] window].bounds
    ......
}

将 self.frame = [[[UIApplication sharedApplication] delegate] window].bounds 改成

- (void)positionHUD:(NSNotification*)notification {
    ......
    //self.frame = [[[UIApplication sharedApplication] delegate] window].bounds
=>
    self.frame= [UIApplication sharedApplication].keyWindow.bounds
    ......
}

原文:https://blog.csdn.net/weixin_42675163/article/details/111663084

上一篇 下一篇

猜你喜欢

热点阅读