This issue is only seen on iOS 8. Works fine on iOS 7.1
Description:
1. Run the code below:
var win = Ti.UI.createWindow({
backgroundColor: 'white',
title:'INSETS',
layout:'vertical'
});
var container = Ti.UI.createView({height:Ti.UI.SIZE,width:Ti.UI.SIZE,layout:'horizontal'});
win.add(container);
var listView = Ti.UI.createListView({top:5,separatorColor:'red',separatorInsets:{left:0,right:0}});
var section = Ti.UI.createListSection();
var data = [
{properties: { title: 'ONE'}},
{properties: { title: 'TWO'}},
{properties: { title: 'THREE'}},
{properties: { title: 'FOUR'}}
];
section.setItems(data);
listView.sections = [section];
win.add(listView);
var nav = Ti.UI.iOS.createNavigationWindow({
window:win
});
nav.open();
2. Run it on iOS 8 & iOS 7 device & notice the difference.
Actual Result:
1. Separator Insets values should be respected on the side of the title/data if the listview row contains a title/data e.g ONE,TWO,THREE,FOUR.
NOTE: Refer screenshots for reference.
Expected Result:
1. Separator Insets values are not respected on the side of the title/data if the listview row contains a titledata
Pull request: https://github.com/appcelerator/titanium_mobile/pull/6091 In iOS 8, there is one new property for all the objects inherit from UIView., which is called "layoutMargins". The solution to set the separatorInset in iOS 7 would not be able to remove the white space you see on the UITableView in iOS 8.
This also affects TableView separatorInsets - has the same change been made to the TableView?
Backport to 3_4_X https://github.com/appcelerator/titanium_mobile/pull/6198
Verified fix on: Mac OSX 10.9.5 Appcelerator Studio, build: 3.4.0.201409261245 Titanium SDK build: 3.5.0.v20141003114918, 3.4.1.v20141003114920 Titanium CLI, build: 3.4.0 Alloy: 1.5.1 Xcode: 6.1 GM Seed iPhone 6 Plus (8.0.2) Using the code above, the separator inset values are now respected and there is no whitespace on the separator. Closing ticket.
Tested and verified separators are touching the edge. Mac osx 10.9.5 Mavericks Appcelerator Studio, build: 3.4.0.201409261245 Titanium SDK, build: 3.4.1.v20141003114920 acs@1.0.18 alloy 1.5.1 install@0.1.7 npm@1.4.23 sudo@1.0.3 titanium 3.4.0 titanium-code-processor@1.1.1 Xcode6.1GM Device: iPhone6 iOS 8.1
This is not fixed. I tested with ti sdk 3.4.0 and 3.4.1 and the same occurs.
I don't seem to be able to attach a file anymore, here is the app.js
And the screenshot https://www.dropbox.com/s/sy7psmk4eu7x8ry/iOS%20Simulator%20Screen%20Shot%2024%20Nov%202014%2018.48.07.png?dl=0
@Dan: The fixes is merged in the 3.4.2+ releases.
@Hans, I'm an idiot, thank you :)