I have created a button to open a window. However, the window should slide in from the left side of the screen up to a certain distance.
For example, if I press the button, a window slide in till half of the screen. How can I achieve this effect ?
button.addEventListener( 'click', function(){
var winInfo = Ti.UI.createWindow({
backgroundImage: 'imagens/bg.png',
url: 'informacoes.js',
})
var slide_it_left = Titanium.UI.createAnimation();
slide_it_left.left = 150
winInfo.left = 320
winInfo.open(slide_it_left)
})
尝试这个
我认为您正在寻找钛中的滑块菜单。这是它的链接
http://mobile.tutsplus.com/tutorials/appcelerator/titanium-mobile-create-a-sliding-menu-for-ios/
让我知道它是否对您有帮助
谢谢