[TIMOB-25330] iOS 11: Sections in grouped Ti.Ui.ListView not properly spaced
GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2017-09-22T11:25:20.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | xcode9 |
Reporter | Matt Berg |
Assignee | Unknown |
Created | 2017-09-21T18:02:25.000+0000 |
Updated | 2018-08-06T17:41:11.000+0000 |
Description
Since upgrading to Xcode 9, the Titanium.UI.iOS.TableViewStyle of GROUPED no longer has the correct spacing. As you can see in the screenshots, the top spacing is correct, but subsequent "sections" are not spaced properly from the previous section.
This is happening in my app, but also happening in the KitchenSink app (screenshot included also)
Attachments
Looks valid, see screenshot (iOS 10.3.1 / 11): !Bildschirmfoto 2017-09-21 um 22.32.09.png|thumbnail! Does not happen with native Xcode, so we'll investigate it!
For what it's worth, this doesn't seem to be specifically an iOS 11 issue. It has only happened since I have done new builds after installing the new Xcode. For example, the current version of my app that is in the App Store has the correct TableView.GROUPED spacing on my device, which is running iOS 11.
I checked it. It's actually a behavioral change when building for iOS 11 with Xcode 9: We return a section-header-height of 0 if the section does not have a header title in it. Previous to iOS 11, this still applied spacing to the section, but iOS 11 will actually put a 0px spacing between them. There is a property called
UITableViewAutomaticDimension
which is recommended as the default-value these days. Using that one, we get a proper spacing again (although it still looks a bit less then what you had before - around 3-5px). Not sure if we should restore the old behavior (custom height for iOS 11+), or apply theUITableViewAutomaticDimension
constant instead of 0 to align with the native behavior. From a developer's perspective, what do you think? I prefer option b).Solved it! It's related to TIMOB-25332 which is caused by the UITableView changes on iOS 11. It's a three-line fix that set's the "estimated height" to it's default, so it has parity with iOS < 11. We will provide a fix for both tickets today, so please follow the other ticket for updates, thanks!
Thank you so much Hans! Worked great for me.
:-)
Closing as a duplicate. If this is in error, please reopen.