Hi, I am developing an iphone app on Titanium 2.1.0 and iOS 5.0. I am stucked in a strange situation. I've three buttons on a scrollview when I open photogallery and comeback from it the last button on the scrollview slides down the screen and and never show its face so that it can be clicked. Here is my code, plz tell me what am I doing wrong:-
var win_newListing=Ti.UI.createWindow({ width: Ti.Platform.displayCaps.platformWidth, height: Ti.Platform.displayCaps.platformHeight, top:0, left:0, backgroundColor:'black' }); var scroll=Ti.UI.createScrollView({ top:0, left:0, contentHeight:'auto', contentWidth:'auto', height: Ti.UI.FILL, width:Ti.UI.FILL }) var lbl_newLisings=Ti.UI.createLabel({ text:'Create New Listings', color: 'yellow', font: {fontSize:20,fontWeight:'bold'}, widht:150, height:25, top: 50 }); var txt_pp=Ti.UI.createTextField({ hintText: 'Proposed Price', borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED, top: 395, width: '75%', height: 35, }); var btn_photo=Ti.UI.createButton({ title: 'Upload Photo From Gallery', top: 450, height: 35 }) var btn_tkphoto=Ti.UI.createButton({ title: 'Take Photo or Video By Camera', top: 495, height:35 }) var btn_addlisting=Ti.UI.createButton({ title: 'Add Listing', top: 550, }) scroll.add(lbl_newLisings); scroll.add(btn_photo); scroll.add(btn_tkphoto); scroll.add(btn_addlisting); win_newListing.add(scroll); win_newListing.open(); var car_pic; btn_photo.addEventListener('click',function(e) { Ti.Media.openPhotoGallery({success:success,cancel:cancel,error:error,allowImageEditing:true}); }); var success=function(event) { car_pic=event.media; }; var cancel=function(){ alert('you canceled'); }; var error=function(error){ alert('there was an error');}I am stucked very hard for a week so plz help ASAP. Many thanks in advance.
Your Answer
Think you can help? Login to answer this question!