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

  • SEARCH
  • Home
  • 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 3805334
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:39:41+00:00 2026-05-19T14:39:41+00:00

While I know how to use gesture recognizer in a view-based application,but when I

  • 0

While I know how to use gesture recognizer in a view-based application,but when I apply the same ideas in a OpenGLSE-based application:
for example,
I add a TapGestureRecognizer,and when I tap on the EAGLView,it crashes.
So can anyone show me a standard usage of UITapGestureRecognizer in an OpenGLES-based application?

best wishes.

  • 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-19T14:39:42+00:00Added an answer on May 19, 2026 at 2:39 pm

    Here some sample code from one of my opengles games with gesture support. (Doesn’t crash and hope it helps)

    - (void)viewDidLoad {
        [super viewDidLoad];
    
        CGRect  rect = [[UIScreen mainScreen] bounds];
        rect.size.height = 320;
        rect.size.width = 480;
        rect.origin.x = 0;
        rect.origin.y = 0;
    
        glView = [[EAGLView alloc] initWithFrame:rect pixelFormat:GL_RGB565_OES depthFormat:GL_DEPTH_COMPONENT16_OES preserveBackbuffer:NO];
        [self.view addSubview: glView];
    
        [glView addSubview: minimapView];
    
        if(!shell->InitApplication())
            printf("InitApplication error\n");
    
        [NSTimer scheduledTimerWithTimeInterval:(1.0 / kFPS) target:self selector:@selector(update) userInfo:nil repeats:YES];
    
        UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(Panned:)];
        [glView addGestureRecognizer:[pan autorelease]];    
    
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(Tapped:)];
        [glView addGestureRecognizer:[tap autorelease]];    
    
        UITapGestureRecognizer *dbltap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(DoubleTapped:)];
        [dbltap setNumberOfTapsRequired:2];
        [glView addGestureRecognizer:[dbltap autorelease]];
    
        UILongPressGestureRecognizer *longpress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(LongPressed:)];
        [glView addGestureRecognizer:[longpress autorelease]];      
    }
    

    And the selector function

    - (void) LongPressed:(UILongPressGestureRecognizer*)sender{
        NSLog(@"Long Pressed");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While I know IronRuby isn't quite ready for the world to use it, I
I wanted to know, while deciding which language or technology to use for implementing
I know I must be missing something, but in a while statement how does
I wrote a while loop in a function, but don't know how to stop
My application needs to use a couple of hard-coded symmetric cryptographic keys (while I
In .NET is there a way to enable Assembly.Load tracing? I know while running
While writing a file using ofstream, how do I know when the file's size
I came across this problem while preparing for an interview and curious to know
What are some key UI design tips that every developer should know? While there
I am a Python newbie coming from a C++ background. While I know it's

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.