Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Titanium もくもく会 #11

Kosuke Isobe
September 10, 2013
210

Titanium もくもく会 #11

Kosuke Isobe

September 10, 2013
Tweet

Transcript

  1. tiapp.xml <modules> <module platform=”iphone”>be.k0suke.tidkliveblur</module> </modules> app.js var tableView = Ti.UI.createTableView({

    backgroundBlurImage: ‘/images/backgroundɻpng’, glassColor: ‘#fff’ // optional }); 13೥9݄10೔Ր༵೔
  2. KitchenSink pull to refresh example var tableView = Ti.UI.createTableView(), pulling

    = false, reloading = false; tableView.addEventListener(‘scroll’, function(e){ var offset = e.contentOffset.y; if (offset <= 65 && !pulling && !reloadingoading) { // release to refresh proc } else if (pulling && (offset > -65 && offset < 0) && !reloading) { // pull down to refresh proc } }); tableView.addEventListener(‘dragend’, function(e){ if (pulling && !reloading) { reloading = true, pulling = false; // reloading proc } }); ... 13೥9݄10೔Ր༵೔
  3. tiapp.xml <modules> <module platform=”iphone”>be.k0suke.isrefreshcontrol</module> </modules> app.js var tableView = Ti.UI.createTableView({

    refreshControlEnabled: true // default true }); tableView.addEventListener(‘refreshstart’, function(){ setTimeout(function(){ tableView.refreshFinish(); }, 5000); }); 13೥9݄10೔Ր༵೔