Open Takashi125 opened 6 months ago
Unfortunately, I wasn't able to figure out a workaround on a ScrollViewHandler. Instead, I reused XF's ScrollViewRenderer, and manually set the Frame of the ViewForZooming as a workaround. this eliminates the bug where the screen repositions itself off the screen after sleep or button tap.
var frameSize = new CGSize(this.Width, this.Height);
var nativeView = ((UIKit.UIView)zoomableSV.Handler.PlatformView);
nativeView.Subviews[0].Frame = new CGRect(x: 0, y: 0, width: frameSize.Width , height: frameSize.Height);
Description
I'm currently porting our Xamarin.Forms application that has a custom ScrollViewer implementing UIKit's ScrollView. But there's a bug that whenever the screen's zoomed and the app resumes from a sleep state, the view changes its position, shrinks its ScrollHeight , and zooming out positions the page on the upper left of the screen.
Update: Pressing the button inside the grid while on zoomed state also produces the same bug.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/Takashi125/UIScrollViewBugProj
Version with bug
7.0.101 , 8.0.3 GA
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 17, iOS 15
Did you find any workaround?
No response
Relevant log output
No response