Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25330] iOS 11: Sections in grouped Ti.Ui.ListView not properly spaced

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2017-09-22T11:25:20.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsxcode9
ReporterMatt Berg
AssigneeUnknown
Created2017-09-21T18:02:25.000+0000
Updated2018-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

FileDateSize
Bildschirmfoto 2017-09-21 um 22.32.09.png2017-09-21T20:32:42.000+0000212169
j23-table-grouped-broken.png2017-09-21T18:00:08.000+0000114497
j23-table-grouped-expected.jpeg2017-09-21T18:00:15.000+0000247114
kitchensink-table-grouped-broken.png2017-09-21T18:00:18.000+000068322

Comments

  1. Hans Knöchel 2017-09-21

    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!
  2. Matt Berg 2017-09-21

    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.
  3. Hans Knöchel 2017-09-22

    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 the UITableViewAutomaticDimension constant instead of 0 to align with the native behavior. From a developer's perspective, what do you think? I prefer option b).
  4. Hans Knöchel 2017-09-22

    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!
  5. Matt Berg 2017-09-22

    Thank you so much Hans! Worked great for me.
  6. Hans Knöchel 2017-09-22

    :-)
  7. Eric Merriman 2018-08-06

    Closing as a duplicate. If this is in error, please reopen.

JSON Source