2012-10-25 2 views

답변

0
var remoteJSON = { 
    "text" : "look at me I put json on the iPads" 
} 

function doStuffWithData(data) { 
    var label = Ti.UI.createLabel({ 
     text : data.text, 
     font : { 
      fontSize : 24 
     } 
    }); 
    win.add(label); 
}; 
var win = Ti.UI.createWindow(); 
win.open(); 
//do a network request, get some JSON data back, see 
//http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Network.HTTPClient 
//also, check out https://github.com/appcelerator/KitchenSink 
doStuffWithData(remoteJSON); 
관련 문제