Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CollectionView not sized correctly on iOS #11070

Closed
WebGoose opened this issue Nov 2, 2022 · 3 comments
Closed

CollectionView not sized correctly on iOS #11070

WebGoose opened this issue Nov 2, 2022 · 3 comments
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter p/0 Work that we can't release without platform/iOS 🍎 t/bug Something isn't working
Milestone

Comments

@WebGoose
Copy link

WebGoose commented Nov 2, 2022

Description

CollectionView is not sizing itself correctly on iOS and is expanding beyond the height of the screen, regardless of the content size.

As in the attached sample, I have a collection of 5 strings on my viewmodel which I've bound to a collection view that is wrapped by a vertical stack. On Android, the collection view only takes up as much space on screen as it needs to in order to display the content.

On iOS the collection view takes up the whole screen. If you wrap it in a scrollview you can see it actually extends beyond a full screen's height. This becomes a problem for all content below the collection view like buttons or labels as they are then pushed far down or off the screen on iOS, but display correctly on Android

Android:
image

iOS:
image

Steps to Reproduce

Create a new maui app.
Replace the mainpage content inside the VerticalStackLayout with a collection view, bound to a few items.

Link to public reproduction project repository

https://dev.azure.com/gooseza/MauiBugs/_git/MauiBugs.CollectionView

Version with bug

6.0.486 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 16.0.3

Did you find any workaround?

No.

You can set a heightrequest but this defeats the purpose because you won't always know how many items your datasource will have and then items will get cut off.

Relevant log output

No response

@WebGoose WebGoose added the t/bug Something isn't working label Nov 2, 2022
@rachelkang rachelkang added this to the Backlog milestone Nov 2, 2022
@ghost
Copy link

ghost commented Nov 2, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@rachelkang rachelkang added area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/iOS 🍎 area-controls-collectionview CollectionView, CarouselView, IndicatorView labels Nov 2, 2022
@rachelkang
Copy link
Member

This one might be a duplicate - will post here if found.

@hartez
Copy link
Contributor

hartez commented Nov 2, 2022

Duplicate of #9135

@hartez hartez marked this as a duplicate of #9135 Nov 2, 2022
@hartez hartez closed this as completed Nov 2, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Dec 2, 2022
@samhouts samhouts added the p/0 Work that we can't release without label Dec 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter p/0 Work that we can't release without platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants