0

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 ?

4

3 回答 3

2
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)

})

尝试这个

于 2013-07-28T21:54:53.793 回答
1

我认为您正在寻找钛中的滑块菜单。这是它的链接

http://mobile.tutsplus.com/tutorials/appcelerator/titanium-mobile-create-a-sliding-menu-for-ios/

让我知道它是否对您有帮助

谢谢

于 2013-07-28T23:19:08.700 回答
0

@Wahhab_mirza 的更好解决方案是使用由 viezel 创建的模块...

Napp幻灯片菜单

js和工作alloy

于 2013-07-31T02:41:10.117 回答