maui icon indicating copy to clipboard operation
maui copied to clipboard

[iOS] UICollectionView ScrollsToTop does not work

Open kklose23 opened this issue 7 months ago • 1 comments

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

kklose23 avatar Jan 12 '24 15:01 kklose23

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.

ghost avatar Jan 12 '24 21:01 ghost

Added the repro code and steps

kklose23 avatar Jan 16 '24 14:01 kklose23

Verified this on Visual Studio Enterprise 17.10.0 Preview 1(8.0.6). Repro on iOS 17.2 with below Project: MonkeyFinder.zip

XamlTest avatar Feb 20 '24 06:02 XamlTest