Minor iPhone issues - images, navbuttons
I have some detection to determine whether or not I'm using android or iphone, and it works fine.
One minor problem is that my images arent being copied when I compiled. They are in the appdir/images folder, and my code is looking for them via /images/imagename.jpg (also tried without the first /, and using a ./). Works fine on android, nothing in iphone.
Second is nav buttons. My issue is that I would like the rightnav to load a .js, the same as a tab click. Here is the code. Basically, if its an iPhone I want it to use nav buttons, if its android I want it to use tabs (which it does fine).
if(Titanium.Platform.osname=='iphone')
{
//
var mylocations = Titanium.UI.createButton({
title:'My Locations',
}); //end button
mylocations.addEventListener('click',function(e)
{
//win2.open({animated:true});
win2.open('locations.js');
}); //end click
win1.setRightNavButton(mylocations);
win1.open();
} //end os detection
else
{
//android os
// add tabs
//
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.open();
}
win2 is defined elsewhere in my code that works fine with the tabs.
Also, when the app loads, the button fades in, instead of just being there.
On my second page I have the same issue, except its the Back button. I want to go back to the main app.js screen but it doesnt do anything.
I put alerts in them to make sure they were being fired, and they were.
1 Answer
-
Never mind I fixed it.