Last active
December 18, 2015 03:39
-
-
Save anthonychung/5719654 to your computer and use it in GitHub Desktop.
#tiAlloy shuffle and update collection with view-binding. Need to use reset.
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 callback(){ | |
//Alloy.Collections.collectionName.shuffle(); | |
// just using suffle wont update the binding, I have to reset, then call trigger change. | |
Alloy.Collections.collectionName.reset(Alloy.Collections.collectionName.shuffle()); | |
Alloy.Collections.collectionName.trigger('change'); | |
$.myTable.height=Ti.UI.SIZE; | |
} | |
<TableView id="myTable" dataCollection="Alloy.Collections.collectionName"> | |
<TableViewRow > | |
<Label text="{title}"/> | |
</TableViewRow> | |
</TableView> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment