Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7653057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:55:45+00:00 2026-05-31T11:55:45+00:00

I am missing something simple here, please help me understand what. My Controller sets

  • 0

I am missing something simple here, please help me understand what.

My Controller sets up

UIGestureRecognizer *swipe = [[UIGestureRecognizer alloc] 
          initWithTarget:gameView action:@selector(handleSwipeFrom:)];
[gameView addGestureRecognizer:swipe];

The GameView is set up

@interface GameView : UIView<UIGestureRecognizerDelegate> 

It further declares

- (IBAction) handleSwipeFrom:(UISwipeGestureRecognizer*)recognizer;

and sets it up as

- (IBAction)handleSwipeFrom:(UISwipeGestureRecognizer*)recognizer {
    NSLog(@" ..............  Swipe detected!! ...................");
}

The Storyboard links UIGestureRecognizer with this IBACtion and is set up as follows:
enter image description here

I am a little concerned that UIGestureRecognizer appear underneath a Controller and not the view as shown, but i can’t seem to be able to correct it.

enter image description here

When application is built, swipes, however are not recognized.

Please suggest what i am missing here and whether i am going the right way about setting things up.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T11:55:47+00:00Added an answer on May 31, 2026 at 11:55 am

    You are setting up two separate gesture recognizers. One in code which likely does nothing, the other in the storyboard that likely has no target.

    In code you should initialize a swipe gesture recognizer like so:

    UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:gameView action:@selector(handleSwipeFrom:)];
     // And assuming the "Up" direction in your screenshot is no accident
    swipe.direction = UISwipeGestureRecognizerDirectionUp;
    

    Or, of course, you could connect the swipe recognizer in the storyboard. This is easily done by either right clicking on the gesture recognizer and connecting the SentActions to the handleSwipeFrom: method, or similarly you can drag from the connections inspector on the right (as seen in screenshot) to the named function. In the image you can see I have my Sent Actions connected to the method swipeTarget:.

    enter image description here

    But currently you have two incomplete recognizers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm probably missing something very simple here, but please bear with me. What I
I'm probably missing something simple here, but I can't find the answer elsewhere. I
No doubt I'm missing something really simple here but I just can't see the
I hope I am not missing something very simple here. I have done a
i'm missing something fundamental here. i have a very simple custom class that draws
I feel like I must be missing something simple here... Nothing sends, nor do
I imagine I am missing something quite simple here, or I am barking up
I think I must be missing something very simple here (and apologies if I
I believe that I may be missing something here, so please bear with me
Perhaps I'm missing something simple, as I believe that this is a common scenario...

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.