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 8380729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:31:52+00:00 2026-06-09T16:31:52+00:00

I have created a basic GLKit application in Objective C (using Xcode), using a

  • 0

I have created a basic GLKit application in Objective C (using Xcode), using a barebones setup I got from here: http://games.ianterrell.com/2d-game-engine-tutorial/ .
I want to make my application interactive, by receiving touch data from the screen.

I don’t have an xib file, and from my limited understanding of this, I have to somehow create a UIView, hook it up to everything I’ve already created, then possibly overload the touches began function (getting the input in a UITouch object, then passing it around the application).

Does anyone know how this can be done?

  • 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-06-09T16:31:53+00:00Added an answer on June 9, 2026 at 4:31 pm

    You need to look into gesture recognizers, please check out the documentation for UIGestureRecognizer: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIGestureRecognizer_Class/Reference/Reference.html

    This example can be used for a pinch gesture on your view:

    UIView *myView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 400)];
    // setup and add the view.
    
    UIPinchGestureRecognizer *pinchGesture = [[UIPinchGestureRecognizer alloc] initWithTarget:self 
                                                                                       action:@selector(handlePinch:)];
    
    [myView addGestureRecognizer:pinchGesture];
    

    Now you must implement a method called handlePinch: (this is you who defines what this method is called), you define this method as follows:

    -(void)handlePinch:(UIPinchGestureRecognizer*)gesture {
        // do what you want, all info about the pinch is in the gesture
    }
    

    Other gestures you can use like this “out of the box” are:

    UITapGestureRecognizer
    UIPinchGestureRecognizer
    UIRotationGestureRecognizer
    UISwipeGestureRecognizer
    UIPanGestureRecognizer
    UILongPressGestureRecognizer
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Rails 3.2.2 application using Ruby version 1.9.2. I have created basic
I have created a basic site using ASP.NET routing according to Mike Ormond's example
I am newbie to Sencha Touch 2 and have created a basic applications using
We have created a simple wix project for a basic windows application. Everything builds
I have created a basic ASP.NET membership application, whereby users can login to view
I am very new to Installshield 2010. I have created a basic MSI setup
I have created a very basic Hello world application where I am trying to
I have created a program in Visual Basic using Microsoft Visual Studio 2010 Professional.
I have created a) a basic application MVVMLight framework. b) another project in the
I have created a basic Sencha Touch Application. It is running normally on my

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.