Does the sencha touch store permently store to an ipad/iphone
Can the secha touch framework store data permanently to a iphone/ipad. So an ap开发者_运维知识库p can update images say once a week and that storage would stay on the ipad/iphone app until prompted to clear?
You can not store data permanently but you can cache the data on the users iPhone or iPad.And it will stay there until the users clears there cache.
Code like this will pull the local data on their device
Ext.regStore('NotesStore', {
model: 'Note',
sorters: [{
property: 'date',
direction: 'DESC'
}],
proxy: {
type: 'localstorage',
id: 'notes-app-store'
},
getGroupString: function (record) {
if (record && record.data.date) {
return record.get('date').toDateString();
} else {
return '';
}
}
});
Here is a more in depth example with lots of comments
http://www.senchaexperts.com/api/extjs4.0/source/LocalStorage.html
精彩评论