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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:42:44+00:00 2026-06-06T10:42:44+00:00

I’m using a tap gesture recognizer to position a little subview with a label

  • 0

I’m using a tap gesture recognizer to position a little subview with a label within another UIView. When the user taps on a view, the label is populated with the title of the component that the user tapped on, and the subview is centered at the tap location.

I need to make sure that the initial position of my gesture recognizer matches the center of the subview as defined in the storyboard(before the user taps on a view), but it seems that I’m unable to find a way to pass this point over to the gesture recognizer.
Is there a way to initialize my tap gesture recognizer with a certain point within a view?

  • 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-06T10:42:45+00:00Added an answer on June 6, 2026 at 10:42 am

    I’m not quite sure what you are asking. Gesture Recognizes do not have a “starting point”. They receive various touch types for touches inside of a given view and allow you to uniquely handle each one.

    If you want to simulate a touch on loading (which sort of sounds like that might be what you are looking to do), reorganize your code to be something like this:

    - (void)viewDidLoad
    {
         //simulate touch here
         [self touchedAtLocation:CGPointMake(100, 100)];
    }
    
    //Your delegate method
    - (void)handleTap:(UITapGestureRecogizer *)recognizer
    {
        [self touchedAtLocation:[recognizer locationInView:self.view]];
    }
    
    - (void)touchedAtLocation:(CGPoint)location
    {
        //perform action based on location of touch
    }
    

    In this example, you could start the position/data of your subview based on what it would be if there was a touch at 100,100.

    Note: I left out code configuring your gesture recognizer because it sounds like you already have that part under control. If not, I can post with more code.

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I need to clean up various Word 'smart' characters in user input, including but

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.