Skip to content
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

能不能优化一下转场动画 #189

Open
shookHead opened this issue Jul 15, 2020 · 5 comments
Open

能不能优化一下转场动画 #189

shookHead opened this issue Jul 15, 2020 · 5 comments

Comments

@shookHead
Copy link

当点击图片消失的时候会出现白色的背景,然后闪一下在消失

@JiongXing
Copy link
Owner

感谢反馈,我找时间看下

@JiongXing
Copy link
Owner

想问下,我那个Demo工程可以复现问题吗?方便的话,能提供复现代码给我吗

@shookHead
Copy link
Author

你好,我已发送到你的邮箱,非常感谢。

@JiongXing
Copy link
Owner

  1. 你好,你的工程强制把目标VC的modalPresentationStyle置为UIModalPresentationFullScreen了,是这个问题。
  2. 看到的白屏,其实是根Window的颜色,你写的是window?.backgroundColor = .white,如果改成.black就是黑屏闪一下,可以试试。
  3. 建议的修复方法是,置换presentViewController:方法的地方,判断一下,如果是默认值UIModalPresentationAutomatic,就改为UIModalPresentationFullScreen。这样就既能解决你说的iOS13问题,也不会影响到其它需要对modalPresentationStyle赋值的模块。
- (void)ci_presentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)flag completion:(void (^)(void))completion {
    if (@available(iOS 13.0, *)) {
        if (viewControllerToPresent.modalPresentationStyle == UIImageRenderingModeAutomatic)
        {
            viewControllerToPresent.modalPresentationStyle = UIModalPresentationFullScreen;
        }
    }
    [self ci_presentViewController:viewControllerToPresent animated:flag completion:completion];
}

@JiongXing
Copy link
Owner

最近每天都太忙了,耽搁了很长时间,抱歉抱歉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants