maui
maui copied to clipboard
[iOS] UICollectionView ScrollsToTop does not work
Description
https://developer.apple.com/documentation/uikit/uiscrollview/1619421-scrollstotop
The ScrollsToTop
property works as expected for ScrollViews
but not CollectionViews
I tried adding the following, but it still did not work:
Microsoft.Maui.Controls.Handlers.Items.CollectionViewHandler.Mapper.AppendToMapping("ScrollsToTop", (h, v) =>
{
var uiView = h.PlatformView.Subviews.FirstOrDefault(x => x is UICollectionView);
if (uiView is UICollectionView collectionView)
{
collectionView.ScrollsToTop = true;
}
});
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.5
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 17
Did you find any workaround?
No
Relevant log output
No response
Hi @kklose23. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Added the repro code and steps
Verified this on Visual Studio Enterprise 17.10.0 Preview 1(8.0.6). Repro on iOS 17.2 with below Project: MonkeyFinder.zip