Skip to content

Instantly share code, notes, and snippets.

@yagitoshiro
Created November 19, 2013 01:48
Show Gist options
  • Save yagitoshiro/7538879 to your computer and use it in GitHub Desktop.
Save yagitoshiro/7538879 to your computer and use it in GitHub Desktop.
tableView + tableViewRows + scrollableView
var rows = [];
var table = Ti.UI.createTableView({top: 20});
for(var i = 0; i < 2; i++){
var row = Ti.UI.createTableViewRow({
id: row + i.toString(), title: i.toString(), height: 110
});
rows.push(row);
}
var views = [];
views.push(Ti.UI.createImageView({height: 100, width: Ti.UI.SIZE, image:'images/black-cat.jpg'}));
views.push(Ti.UI.createTextField({left: 10, right: 10, borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED}));
views.push(Ti.UI.createImageView({height: 100, width: Ti.UI.SIZE, image:'images/blue-cat.jpg'}));
rows[0].add(Ti.UI.createScrollableView({
views: views
}));
table.setData(rows);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment