Last active
December 28, 2015 00:49
-
-
Save tripitakit/7416540 to your computer and use it in GitHub Desktop.
A functional rewrite of an Appcelerator Titanium iOS tableView test code which displays four tables with combination of moving/moveable/editing/editable properties to test their effects on rows' appearance and behavior.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(win) { | |
["moving editing", | |
"moving editable", | |
"moveable editing", | |
"moveable editable" | |
].map(function(test){ | |
var table = { headerTitle: test }; | |
test.split(" ").map(function(property){ | |
table[property] = true; | |
}); | |
return table; | |
}).map(function(table) { | |
table.data = ['Alpha', 'Beta','Gamma'].map(function(row_title) { | |
return {title: row_title} | |
}); | |
table.height = 150; | |
table.top = 40; | |
return(table); | |
}).map(function(table) { | |
return Ti.UI.createTableView(table); | |
}).map(function(tableView){ | |
win.add(tableView); | |
}); | |
win.open(); | |
})(Ti.UI.createWindow({ | |
backgroundColor:'#fff', | |
layout:'vertical', | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment