Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19777] iOS: ListView separator has huge margins on iOS 9

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2015-11-04T18:51:41.000+0000
Affected Version/sRelease 5.0.1, Release 5.0.2, Release 5.0.0
Fix Version/sRelease 5.1.0, Release 5.2.0
ComponentsiOS
Labelsios, listView
Reporter Ricardo Ramirez
AssigneeAngel Petkov
Created2015-10-23T17:12:05.000+0000
Updated2015-11-20T04:55:24.000+0000

Description

Issue Description

Titanium does not appear to support setting the new iOS 9 feature cellLayoutMarginsFollowReadableWidth. **Attached Screen Shots

Steps to replicate

-Download the attached BugSample.zip file -Import the project to appcelerator studio -Build and run

Attachments

FileDateSize
2015-10-26 14.24.02.png2015-10-23T17:10:50.000+0000232215
2015-10-26 14.24.07.png2015-10-23T17:10:50.000+0000214315
BugSample.zip2015-10-23T17:10:57.000+0000788852

Comments

  1. Angel Petkov 2015-11-03

    Could you please provide more detail. Does the problem only occur when building on alloy and deploying on an iPad ? If not, could you please re-produce the issue on a classic build and provide the code. Thanks!
  2. Christi 2015-11-03

    The problem is iOS 9 specific due to the newly added cellLayoutMarginsFollowReadableWidth. I imagine it would occur for both iPad and iPhone although I did not test for iPhone. I have no idea if it happens when not building on alloy but probably not. Why would I create a classic app? I already provided an example app. Is that not good enough? I was under the impression that Alloy is the framework everyone should be using. I have never created a classic app and don't particularly want to spend time learning how. I'm pretty sure the issue will be resolved (back to the way it previously looked) by setting cellLayoutMarginsFollowReadableWidth to NO/false. If you wish to support this setting being true, it would require some additional work to allow this to be set by the user on a ListView.
  3. Angel Petkov 2015-11-04

    PR pending https://github.com/appcelerator/titanium_mobile/pull/7393 Demo Code:
       var win = Ti.UI.createWindow({backgroundColor: 'white'});
       var listView = Ti.UI.createListView();
       var sections = [];
       
       var sectionOne = Ti.UI.createListSection({ 
         headerTitle: 'Random Items',
         height: Ti.UI.SIZE,
         width: Ti.UI.SIZE,
       });
       var dataSet1 = [
           {properties: { title: 'Item one'}},
           {properties: { title: 'Item two'}},
       ];
       sectionOne.setItems(dataSet1);
       sections.push(sectionOne);
       
       var sectionTwo = Ti.UI.createListSection({ 
         headerTitle: 'More Random Items',
         height: Ti.UI.SIZE,
         width: Ti.UI.SIZE,
       });
       var dataSet2 = [
           {properties: { title: 'Item 2.1'}},
           {properties: { title: 'WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW'}},
           {properties: { title: 'Item 2.3'}},
       ];
       sectionTwo.setItems(dataSet2);
       sections.push(sectionTwo);
       
       listView.sections = sections;
       win.add(listView);
       win.open();
       
  4. Hans Knöchel 2015-11-04

    PR approved!
  5. Harry Bryant 2015-11-06

    Verified as fixed, was able to reproduce the error on iOS 9 devices and simulators using the 5.0.2.GA SDK, but problem is not present with iOS 8 devices with 5.0.2.GA. Can confirm that the issue is no longer reproducible using 5.1.0.v20151104121228 SDK and later. Tested on both Alloy and Classic projects, using the following configurations: iPad Retina 9.0 & iPad Air 2 Sim 9.1 iPhone 6S 9.1 & iPhone 6S+ Sim 9.1 Xcode 7.1 & 6.4 Mac OSX El Capitan 10.11 (15A284) Ti SDK: 5.1.0.v20151104190037 Appc NPM: 4.2.1 Appc CLI: 5.1.0-42 Ti CLI: 5.0.4 Alloy: 1.7.23 Xcode 7.1(7B91b) Node v0.12.7 production *Closing ticket.*

JSON Source