Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

iPad horizontal swipe navigation

How do i accomplish this?
I have 10 images and if i swipe to the left or right i wan the next or previous one to appear.

Is there a view allready to do this?

— asked August 24th 2010 by Frederik Heyninck
  • images
  • ipad
  • navigation
  • swipe
0 Comments

2 Answers

  • I got this working with createScrollableView.
    Now i can swipe left and right, but what if i want to swipe up and down?
    Is there a way to do this?

    — answered August 24th 2010 by Frederik Heyninck
    permalink
    2 Comments
    • scrollView

      http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.ScrollView-object

      — commented August 24th 2010 by Esteban Fernandez
    • This has a standard behavior of x scrolling if i add my views, but how about y scrolling? my code: http://pastie.org/1112341

      ps: if my pdf in the webview is smaller then the actual ipad size my horzintal (x) swiping doesn't work…

      — commented August 24th 2010 by Frederik Heyninck
  • Add event handler to view, detect the swipe direction - X or y then change image accordingly. But last time i checked, swipe event trigger multiple times, so you might want to a look into touchstart and touchend to imitate swipe for the directions. That's what i used to create a much stable scrollable image gallery.

    — answered August 24th 2010 by Daniel Lim
    permalink
    2 Comments
    • Hi Daniel is it possible to share your code?
      This is the code i have now. http://pastie.org/1112341

      — commented August 24th 2010 by Frederik Heyninck
    • I mentioned the use of it for x direction on this post,
      http://developer.appcelerator.com/question/44131/clear-cache-remote-image

      — commented August 24th 2010 by Daniel Lim
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.