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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T21:43:14+00:00 2026-05-21T21:43:14+00:00

I have some labels in my app like this… What i need to do

  • 0

I have some labels in my app like this…

enter image description here

What i need to do is, when clicking on a label, just I’m showing label name in the bottom of the screen. It works fine while clicking on each cell separately. But i want to show the changes even the user click on a particular label and move his finger on another label. That is, once he pressed on screen, where ever his finger moves, i want to trace those places and want to show the changes. How can i do this? Please explain briefly.

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-21T21:43:15+00:00Added an answer on May 21, 2026 at 9:43 pm

    By default, touch events are only sent to the view they started in. So the easiest way to do what you’re trying to do would be to put all of your labels in a container view that intercepts the touch events, and let the container view decide how to handle the events.

    First create a UIView subclass for the container and intercept the touch events by overriding hitTest:withEvent::

    -(UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
        // intercept touches
        if ([self pointInside:point withEvent:event]) {
            return self;        
        }
        return nil;
    }
    

    Set that custom class as the class of the container view. Then, implement the various touches*:withEvent: methods on your container view. In your case, something like this should work:

    -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
        // determine which view is under the touch
        UIView* view = [super hitTest:[[touches anyObject] locationInView:self] withEvent:nil];
    
        // get that label's text and set it on the indicator label
        if (view != nil && view != self) {
            if ([view respondsToSelector:@selector(text)]) {
                // update the text of the indicator label
                [[self indicatorLabel] setText:[view text]];
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some HAML code like this: .clearfix =f.label t(labels.shortened_urls.fqdn_url) =f.url_field :fqdn_url, {:readonly =>
I have some troubles with positioning my label/password field. With this code they both
I have some labels that I want to allow users to edit. Is it
everyone. I have some labels that I draw them in the xib file, and
I have a GtkVBox with some labels and some empty blocks in it ...
I have a HUD window that has some labels on it, and I want
I have some models; Vocabularies (tags lists), Labels (tags) and different articles types. These
I have writen some code in VBA (Excel) with error handling labels. It worked
I have a radio button list and some of the labels are quite long
I have some code that will change the background color of a specific label

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.