UITouchSwipes

Discussion in 'iOS Development' started by Tyr0, Aug 8, 2008.

  1. Tyr0

    Tyr0 New Member

    Joined:
    Dec 17, 2007
    Messages:
    533
    Likes Received:
    6
    Device:
    iPhone 3GS (White)
    Yeah, i am in the process of making a PocketTouch type app, not involving music player or anything, but, how would i get UITouchSwipe to work. I beleive i have all the coding correct, but when i try to make it, i get this error:
    Code:
    FlipSwitch.m: In function '-[FlipSwitch touchesEnded:withEvent:]':
    FlipSwitch.m:54: error: 'UITouch' undeclared (first use in this function)
    FlipSwitch.m:54: error: (Each undeclared identifier is reported only once
    FlipSwitch.m:54: error: for each function it appears in.)
    FlipSwitch.m:54: error: 'touch' undeclared (first use in this function)
    FlipSwitch.m:64: error: 'UITouchSwipeLeft' undeclared (first use in this function)
    
    I beleive that that means i need to import a header file, but i cannot find out which one. I have searched apples website, and google for hours, and i have found they want me to import uikit/uitouch.h, but it says it cannot be found, argh! soo hard. Any help would be appreciated.
    THX -Tyr0
  2. Spreche

    Spreche Member

    Joined:
    Dec 27, 2007
    Messages:
    164
    Likes Received:
    0
    Device:
    iPhone
    Did you put the instance variables in the header file? I looked at the ADC and I couldn't find UITouchSwipe or UITouchSwipeLeft. I found UITouch and it says something about the UIEvent header. Maybe try importing the header files through the .m file instead of the .h file, or .h instead of .m. But I don't know much about that, but I will try to research it some more.
  3. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    you must get the SDK headers (preferably pre-patched (illegal!)) and then import it.
  4. Tyr0

    Tyr0 New Member

    Joined:
    Dec 17, 2007
    Messages:
    533
    Likes Received:
    6
    Device:
    iPhone 3GS (White)
    yeah, thats what i figured johnny. I decided to dualboot my comp with ubuntu now, gonna try tonight or tomorrow, i will let everyon know how it goes and see if it will compile then. I saw skylar posted his source code and it has the same UITouch.h and i get the same error, so he must be on linux too.
  5. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55

    1. You will most likely NOT be able to install the linux toolchain (very hard!).
    2. Its really quite simple to patch the UITouch header.
  6. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    I don't have the UITouch header. And posting my source was a complete accident. The source I posted is messy, buggy, and far from finished. It doesn't even have dealloc methods yet. Don't learn from that. There are far better examples out there.
  7. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    no dealloc. OUCH. Also, didn't you say you managed to use all that stuff without messing with the headers?
  8. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    Correct. That is why all this all beta right now. I like to get all the objects I'm going to have, then create my dealloc. It's a bad habit I have. It's exactly why I don't want people looking at my source right now.

    Also correct. I don't use the SDK headers. I could easily get them off of the computer I use for work, but I won't. Everything I release for Cydia is entirely toolchain + workarounds.
  9. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    excellent. i like your thinking. that is a bad habbit >.<

Share This Page