iPad popoverView - any examples?
I am finding it a bit hard to locate a good example for the popover. The Kitchen Sink version is openPhotoGallery specific - so it's not useful for the the basic API version.
If someone has some working code to share that'd be cool.
1 Answer
-
Accepted Answer
Hey Dan,
This is pretty but hopefully will help a bit (I used this as app.js):
// // create base UI tab and root window // var win1 = Titanium.UI.createWindow({ title:'Tab 1', backgroundColor:'#fff' }); var label1 = Titanium.UI.createLabel({ color:'#999', text:'I am Window 1', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }); var b1 = Titanium.UI.createButton({ title:'View popover', height:40, width:200, top:400 }); win1.add(label1); win1.add(b1); var view_p = Ti.UI.createView({ backgroundColor:'#fff', borderColor:'#363636', borderWidth:2, width:300, height:100 }); var label_p = Titanium.UI.createLabel({ color:'#999', text:'I am Window 2', textAlign:'center', width:'auto' }); view_p.add(label_p); b1.addEventListener('click', function() { var popover = Ti.UI.iPad.createPopover({height:100,width:300}); popover.add(view_p); popover.show({view:b1}); }); win1.open();
or maybe this: