mrackwitz / MRProgress

Collection of iOS drop-in components to visualize progress
MIT License
2.55k stars 306 forks source link

iPhone 6/6 plus overlay view blinking #74

Closed vani2 closed 9 years ago

vani2 commented 9 years ago

I discovered strang bug: my iPhone screen fast resize back and forth when I call
MRProgressOverlayView.showOverlayAddedTo(fakeView, title: "Loading", mode: MRProgressOverlayViewMode.Indeterminate, animated: false) The problem inside MRBlurView.m (line 185): [window drawViewHierarchyInRect:window.bounds afterScreenUpdates:YES]; Before this call everything is all right, right after view is zoomed. After some time size if ok, but you can see this blinking. photo oct 21 17 52 52 (not cropped, it's fullscreen snapshot) In my case afterScreenUpdates:NO resolve this issue, but please consider blur is properly applied.

jeffreyjackson commented 9 years ago

This is the same issue I'm seeing, @mrackwitz

mrackwitz commented 9 years ago

Thanks @vani2 for your feedback. I know about this issue. It seems to be a from Apple unconfirmed bug in UIKit, which is spooking around since longer. There are radars filed about that. It's not possible to just set the parameter afterScreenUpdates: to NO. This will cause other issues. But let me reinvestigate, if those are perhaps less serve.

There are several workarounds available depending on which version of the component you are using and which deployment target version of iOS you have to support. If you have dropped iOS 7 support already, then you could try the prerelease 0.8.0-alpha1. But beware: there are issues with the new UIVisualEffectView if you are not supporting the full resolution on iPhone 6(P). I have filed radars about that, too. :unamused: Furthermore you could try the branch uitoolbar_blur, if you are not supporting landscape mode, which makes use of Apple's blur implementation without directly using private APIs. You will need iOS 8 for the rounded corners using the new introduced maskView property.

mrackwitz commented 9 years ago

This is fixed with the 0.8.0 release by not using the iOS 7 snapshot API anymore, as it is currently broken.