treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] Someone test this on an iPhone/iPad/iAnything please

  • I was trying to add touch support to the iPhone/iPad because of this issue submitted for AnythingSlider. Since I don't own any i-gadget, I asked the person submitting the request to test it for me... well, I was told it didn't work on an iPhone and I'm still waiting to hear if it works on an iPad. Maybe I'm just getting impatient, but I would appreciate if someone with one of those devices could test this? Thanks!

    Demo to test

    If it doesn't work, try this one.... and if this second one doesn't work... then, ummm, phooey.
  • Hey @Mottie - working fine for me on the iPhone. I'm assuming you just mean touching the buttons and not actually 'swiping'? If so, flawless.
  • @TheDoc yeah I meant swiping. I can "swipe" with my mouse and it works just fine, I'm pretty sure the "touchstart" and "touchend" events are correct, just not sure why they wouldn't work.
  • Swiping doesn't work on my iPhone. Don't know whether it helps but flexslider has a swipe feature. http://flex.madebymufffin.com/
  • @Johnnyb Cool thanks, but it looks like the flexslider is only looking for a touch (not a swipe) on top of the navigation arrows... unless I'm not seeing the right code.

    Anyway, I went ahead and tried something else. So please see if this new demo works. If it does work properly, then swiping should send the slider in the direction of the swipe, which turns out to be the opposite of the direction arrow.
  • Mottie - 2269!? That's a lot of saves! It's not swiping for me. BUT! At least this time when I try to swipe it, the page doesn't scroll (which it was doing in the previous version).

    I'm using an iPhone 4 with the latest software.
  • @Mottie - If you are using a Mac you can get a iOS simulator by installing Xcode. It's available in the Mac appstore. With the iOS simulator you can emulate any iPhone or iPad you wish, right on your desktop.

    I own a iPhone, and I'm still using the simulator instead :-)
  • @TheDoc ugh LOL. Thanks for checking, I guess I need to keep digging... you'd think they'd make it simple huh? Oh yeah the 2269 saves is because it's the AnythingSlider playground that everyone uses.... there are actually a couple of other "playground" fiddles for older versions with about a thousand each LOL.

    @gno Thanks, but I don't own a Mac at all. All PC. And I'm not sure how you can simulate your fingers, do I want to know? o.O LOL
  • Ok, this one better work! LOL... I would appreciate any and all feedback :)

  • @Mottie, jackpot! Works perfectly!!
  • WOOOOOOO HOOOOOOOOO, thanks so much for testing this for me...

    I found out that the "touchend" event never fires if your finger goes off the screen. *smack head*

    I think I'll make a blog post about it.
  • Awesome, glad to help. You should defo write a post on it, would be interesting to see how you accomplished it. I've done something similar before but using a jquery plugin to help me out with the swiping.

    Oh and by the way, you should get an iphone!
  • @Johnnyb: If you are still interested, here is my blog post write up on how to add swipe support to an element.
  • Hey @Mottie, awesome! I'll definitely check it out when I get a moment!