Project: titanium
Issue TIMOB-19209: iOS: ListView randomly not shown since 4.1.x
{code:title=Environment} Operating System Name = Mac OS X Version = 10.10.4 Architecture = 64bit # CPUs = 8 Memory = 17179869184 Node.js Node.js Version = 0.10.38 npm Version = 1.4.28 Titanium CLI CLI Version = 4.0.1 Titanium SDK SDK Version = 4.1.0.GA SDK Path = /Volumes/Data/Users/sebastian/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.GA Target Platform = iphone {code} since the update to 4.1.0.GA, my listViews are not showing every time I open a window with a listview in iOS. Can't reproduce it. It's absolute randomly. I'm coming from 4.1.0.v20150516202834 where it works as normal. I posted it into the community and [~fokkezb] confirms this bug: https://community.appcelerator.com/topic/2513/4-1-0-ga-now-available/14 I think I can workaround this bug while giving explizit height in the properties. So far in my testing, the problem doesn't appear anymore. {code:title=Example} var win = Ti.UI.createWindow(); var itemTemplate = { properties: { // These are the same as the list data item properties // The list data item properties supersedes these if both are defined accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_NONE }, childTemplates: [ // Add view subcomponents to the ListItem { // Display a Label type: 'Ti.UI.Label', // If there is a rowtitle dictionary in the ListDataItem, // that data binds with this view subcomponent bindId: 'rowtitle', properties: { // Set view properties for the Label view subcomponent font: {fontSize: '14dp'} }, childTemplates: [ // View subcomponents can also have subcomponents ] } // ...add more components ] }; // Simplest list data items that can be displayed in a list view var data = [ { properties: { height: 44 }, rowtitle: { text: 'Row 1' } }, { properties: { height: 44 }, rowtitle: { text: 'Row 2' } }, { properties: { height: 44 }, rowtitle: { text: 'Row 3' } } ]; var data1 = [ { properties: { height: Ti.UI.SIZE }, rowtitle: { text: 'Row 1' } }, { properties: { height: Ti.UI.SIZE }, rowtitle: { text: 'Row 2' } }, { properties: { height: Ti.UI.SIZE }, rowtitle: { text: 'Row 3' } } ]; // works //var listSection = Titanium.UI.createListSection({items: data}); // works randomly not var listSection = Titanium.UI.createListSection({items: data1}); // Add the list section to a list view var listView = Titanium.UI.createListView({ sections: [listSection] }); var listView = Titanium.UI.createListView({ sections: [listSection], templates: { default: itemTemplate }, defaultItemTemplate: 'default' }); win.add(listView); win.open(); {code}
Story points: 5