Bug 60768 - [iOS] ListView clipped when SearchController set on iOS 11
Summary: [iOS] ListView clipped when SearchController set on iOS 11
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.5.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-11-20 12:27 UTC by Joe Brock
Modified: 2018-01-08 14:31 UTC (History)
2 users (show)

Tags: ios 11, searchcontroller, search bar, ac
Is this bug a regression?: ---
Last known good build:


Attachments
iPhone 8 iOS 11 SearchController ListView Layout Bug (88.45 KB, image/jpeg)
2017-11-20 12:27 UTC, Joe Brock
Details
iPhone X iOS 11 SearchController ListView Layout Bug (78.68 KB, image/jpeg)
2017-11-20 12:27 UTC, Joe Brock
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 60768 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Joe Brock 2017-11-20 12:27:00 UTC
Created attachment 25760 [details]
iPhone 8 iOS 11 SearchController ListView Layout Bug

After upgrading to the latest XF build (which is 2.5.0.91635 at time of writing), it looks like many of the reported iOS 11.x layout issues have been fixed. Although it seems that search wasn't part of these fixes.

When defining a SearchController on a NavigationItem on iOS 11.x, this seems to cause clipping at the bottom of the ListView that's currently on screen. I've tried calling SetNeedsLayout up the entire parent chain after setting the SearhController (as a workaround) which does *not* seem to help.

If I had to guess, I would suggest that it's to do with the '140' constant defined below as part of 2.5.0-sr1, which likely should be larger when a SearchController is defined.

https://github.com/xamarin/Xamarin.Forms/pull/1274/files#diff-efa21a065745b4e261efc4bf6a5d8784R156

I have a reproduction which you can check out below. I would also suggest testing this with different values of HidesNavigationBarDuringPresentation and HidesSearchBarWhenScrolling.

https://github.com/jdbrock/XFReproSearchControllerListViewWrongSize

This was observed on an iPhone 8 and iPhone X running iOS 11.1.

Screenshots attached.
Comment 1 Joe Brock 2017-11-20 12:27:40 UTC
Created attachment 25761 [details]
iPhone X iOS 11 SearchController ListView Layout Bug
Comment 2 Joe Brock 2018-01-08 14:31:57 UTC
Any timeline on when this might be resolved? Can I help at all?