I have created a native iOS app in Titanium. Now I want this app to run on a website.
For example : If I go to a website there will button. When the button is pressed the app will be launched in a the browser.
I tried using webviews, but it did not work. Is there a way to do this ?
var win = Titanium.UI.createWindow({backgroundColor:'white'});
var centerCoordinateY=298;
var centerCoordinateX=255;
win.orientationModes = [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT];
var currentOrientation = win.getOrientation();
var clickSound = Titanium.Media.createSound();
var alphabet = 25;
var wheel = Titanium.UI.createImageView({
backgroundImage:'New-iPhone-Front-B.png',
top:60,
anchorPoint:{x:0.5, y:0.5},
});
win.add(wheel);
var wheelTop = Titanium.UI.createImageView({
backgroundImage:'New-iPhone-FrontCover-A.png',
top:60,
anchorPoint:{x:0.5, y:0.5},
});
win.add(wheelTop);
var imageView = Ti.UI.createImageView({
backgroundImage:'/Front-Wheel/'+alphabet+'.png',
width:155,
height:80,
right:25,
top:155,
zIndex:5
});
wheelTop.add(imageView);
wheelTop.addEventListener('touchstart', function(e){
var conv = e.source.convertPointToView({x: e.x, y:e.y}, win);
var newAngle = Math.atan2(conv.y - centerCoordinateY, centerCoordinateX - conv.x)* -(180 / Math.PI);
diff = (newAngle - old);
});
↧