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

IOS calendar aesthetic issue & performance issue #112

Open
eyeveye opened this issue Feb 11, 2023 · 10 comments
Open

IOS calendar aesthetic issue & performance issue #112

eyeveye opened this issue Feb 11, 2023 · 10 comments
Labels
awaiting-author Awaiting a respose from the author bug Something isn't working ios

Comments

@eyeveye
Copy link

eyeveye commented Feb 11, 2023

The image below show the exact problem.
image

The other issue is the slow performance on the calendar. It took quite a while to display out the calendar.

@eyeveye eyeveye added the bug Something isn't working label Feb 11, 2023
@ME-MarvinE
Copy link
Owner

ME-MarvinE commented Feb 11, 2023

Hi eyeveye, please use the issue template as it provides useful information about how the bug may be caused.

Unfortunately I do not own an IOS device and cannot find or test for issues on IOS devices. I can only rely that Xamarin or MAUI works properly cross platform.

The CalendarView is just a CollectionView. I have mentioned that CollectionView performance is extremely slow in MAUI and so far with everything I have done to try to make it faster there has been nothing that has worked to fix this. For example using a Grid instead of a CollectionView or using an actual CollectionView and just rendering Labels.

For your issue, the only thing I can do is give suggestions: Luckily I have seen this layout issue before in earlier versions of MAUI on Android and know that it is either caused by the Border of the item not clipping the content to its shape, or that the CollectionView doesn't have enough space to render all its items, so they are just being cut off to a size evenly divided between the items:

  • For the first potential cause, try finding another way to clip the content to a circular shape.

  • For the second potential cause, try implementing the DaysView container yourself, or completely implementing a CollectionView with a Calendar's Days property manually and giving it more horizontal or vertical space, try changing the CollectionView's ItemsLayout property to a GridItemsLayout with an increased vertical and horizontal spacing, or try making the DayTemplate smaller.

You can modify the look of the container of days by setting the CalendarView's DaysViewTemplate property.

You can modify the look of a Day by setting the CalendarView's DayTemplate property.
Default functionality can be achieved easier by using a DayView.

  • I explain DayView customisation in another comment here.

  • I have started a discussion over a year ago to get this into the MAUI Community Toolkit in order to have better support and better performance here.

  • Here are release notes where I explain what I'm doing about the performance issue on MAUI.

@brettnagy
Copy link

@ME-MarvinE - could you complete your sentence above please, the one that ends the 4th para : "Try setting the"...

The suspense is killing me and I'm seeing the same issue on iOS. :)

@ME-MarvinE
Copy link
Owner

@brettnagy Done:

For your issue, the only thing I can do is give suggestions: Luckily I have seen this layout issue before in earlier versions of MAUI on Android and know that it is either caused by the Border of the item not clipping the content to its shape, or that the CollectionView doesn't have enough space to render all its items, so they are just being cut off to a size evenly divided between the items:

  • For the first potential cause, try finding another way to clip the content to a circular shape.

  • For the second potential cause, try implementing the DaysView container yourself, or completely implementing a CollectionView with a Calendar's Days property manually and giving it more horizontal or vertical space, try changing the CollectionView's ItemsLayout property to a GridItemsLayout with an increased vertical and horizontal spacing, or try making the DayTemplate smaller.

@ME-MarvinE ME-MarvinE changed the title ios calendar aesthetic issue & performance issue IOS calendar aesthetic issue & performance issue Mar 17, 2023
@ME-MarvinE ME-MarvinE added the ios label Apr 1, 2023
@pblake81239
Copy link

Any ideas on when we might see performance improvement is it solely relying on CollectionView getting fixed? Do we know if they have this on the roadmap?

@ME-MarvinE
Copy link
Owner

ME-MarvinE commented Apr 3, 2023

@pblake81239 Relying on CollectionView being fixed. I haven't found any alternatives on GitHub and I am less motivated to learning platform specific APIs than I am/was when learning Forms and Maui to create the plugin so the extent of doing this would be limited to "if I feel like it" and of course suggestions/contributors. Even then, I won't be able to do anything for IOS as I don't have an IOS device, nor do I plan on getting one.

@brettnagy
Copy link

FWIW: the performance in release mode is very different to debug mode. I have Android and iOS Maui apps in the app stores, one using this control, and performance is pretty good.

@ME-MarvinE
Copy link
Owner

ME-MarvinE commented Apr 3, 2023

@brettnagy Interesting, is one of your apps on both platforms or only on one, if on both, do you notice any performance differences? If on one, which platform?

Also, do you use all 5/6 rows of the Calendar?

@pblake81239
Copy link

Actually on Android Release mode performance is pretty good. I will check IOS this week. I hadnt used it in release mode thanks for that!

@brettnagy
Copy link

I do have the same app on both Android and iOS, but it’s hard for me to fairly compare Android and iOS as my hardware is so different: middle of the road Samsung v. iPhone 14 Max. The Samsung performs as well my iPhone, so maybe that gives Android the edge.

@ME-MarvinE
Copy link
Owner

@eyeveye Do you have any updates on this? Are you still experiencing this? Could you try to run it in release mode too, to see if performance improves as @pblake81239 mentioned?

@ME-MarvinE ME-MarvinE added the awaiting-author Awaiting a respose from the author label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-author Awaiting a respose from the author bug Something isn't working ios
Projects
None yet
Development

No branches or pull requests

4 participants