Project: titanium
Issue TIMOB-16218: iOS: Ti.UI.RefreshControl.beginRefreshing() does not work
h2.Test Code {code} var win = Ti.UI.createWindow(); var counter = 0; function genData() { var data = []; var i = 1; for ( i = 1; i <= 3; i++) { data.push({ properties : { title : 'ROW ' + (counter + i) } }); } counter += 3; return data; } var section = Ti.UI.createListSection(); section.setItems(genData()); var control = Ti.UI.createRefreshControl({ tintColor : 'red' }); var listView = Ti.UI.createListView({ sections : [section], refreshControl : control }); control.addEventListener('refreshstart', function(e) { Ti.API.info('refreshstart'); setTimeout(function() { Ti.API.debug('Timeout'); section.appendItems(genData()); control.endRefreshing(); }, 2000); }); win.add(listView); win.open(); control.beginRefreshing(); //It does not do anything when being called {code} h2.Actual Result Nothing happens h2.Expected Result RefreshControl should show its loading state in other words show the spinning wheel at the top
Story points: 5