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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:09:18+00:00 2026-05-22T19:09:18+00:00

I am working on a project in which I have to create a tagging

  • 0

I am working on a project in which I have to create a tagging screen.What exactly I have to do is when the user touch on the image a rectangle should be drawn assuming the center points be the touch points.Please suggest me the approach or some sample code which I should follow it.
Any suggestions will be highly appreciated.
Thanks in advance.

  • 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-22T19:09:18+00:00Added an answer on May 22, 2026 at 7:09 pm

    There are few ways to do this but I prefer the idea of using layers for this task. For this to work, you will have to attach a tap recognizer to the image view and add the tag layers as sublayers to the image view’s layer in the gesture handler.

    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
    [imageView addGesture:tap];
    [tap release];
    
    ...
    
    - (void)handleGesture:(UITapGestureRecognizer*)gesture {
        CALayer *newLayer = [CALayer layer];
        layer.bounds = layerBounds;
        layer.position = [gesture locationInView:gesture.view];
        layer.backgroundColor = layerBackgroundColor;
    
        [imageView.layer addSublayer:layer];
    }
    

    You will have to add the QuartzCore framework for this to work and #import <QuartzCore/QuartzCore.h> for this to work.

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

Sidebar

Related Questions

Suppose you're working on an enterprise project in which you have to get management
I am working on a project in which I have many text and xml
I'm working on a project which is just about to start, and since I
I'm working in a project which needs to clean up some third party XSD
I am working on a project which uses an import #import progid:Blah.blah.retrieve rename_namespace(Blah) but
I'm working on a project which stores single images and text files in one
I'm working on a project which I'm really not sure how to unit test.
I am working on a project which was developed in Visual Studio 2005 (.NET
I'm looking at working on a project which uses C#.NET (sitting on a windows
I am currently working on a project which requires migration of content from different

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.