roubachof / Sharpnado.MaterialFrame

A modern MAUI (and XF) Frame component supporting blur, acrylic, dark mode. Implemented with RealtimeBlurView on Android (custom blurview) and UIVisualEffectView on iOS.
MIT License
498 stars 26 forks source link

When the frames display for the first time on iOS there's a white flash as the frame appears #10

Closed rs-mobitech closed 3 years ago

rs-mobitech commented 4 years ago

Hi, With iOS when frames (for example in Silly App) display for the first time, there is a flash of white that displays in each frame. Any idea on what's causing this?

ezgif com-video-to-gif

rs-mobitech commented 4 years ago

Hello, any update yet? I would really like to use your frames but the white flash appearing for a second in the frames is a problem for me so I cannot use them right now. Thanks

roubachof commented 4 years ago

Nope, no news, don't have time for now. But I welcome any PR 👍 It's all in the https://github.com/roubachof/Sharpnado.MaterialFrame/blob/master/MaterialFrame/MaterialFrame.iOS/iOSMaterialFrameRenderer.cs file. I guess the LayoutSubviews method is called a bit too late...

rs-mobitech commented 4 years ago

Thanks, sorry but my skills are not up to yours as far as understanding what is happening.

roubachof commented 3 years ago

unfortunately, I cannot make the flash go away (anyway in the HorizontalListView, didn't test it in other list view like CollectionView). It seems to occur when using Sharpnado Tabs + UICollectionView

roubachof commented 3 years ago

Ok, found it. By default all changes on CALayers are animated, just had to call RemoveAllAnimations() after setting the Frame:

                _intermediateLayer.Frame = new CGRect(0, 2, Element.Width, Element.Height - 2);
                _intermediateLayer.RemoveAllAnimations();
roubachof commented 3 years ago

fixed by https://github.com/roubachof/Sharpnado.MaterialFrame/releases/tag/v1.1.3