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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:41:08+00:00 2026-06-09T09:41:08+00:00

I have an UIImageViews with userInteractionEnabled , and i want to know with image

  • 0

I have an UIImageViews with userInteractionEnabled, and i want to know with image i currently tap. What i should do to know that? I have a poster wall and class for that ThumbPosterModel there i have all poster information with i want to pass through.

So my code is:

for (ThumbPosterModel *tPoster in _thumbsPosterStack) {

    UIImageView *imageView = [[UIImageView alloc] initWithImage:tPoster.thumb];
    imageView.userInteractionEnabled = YES;
    imageView.frame = CGRectMake(i, imageView.frame.origin.y, imageView.frame.size.width, imageView.frame.size.height);

    [_posterWallScrollView addSubview:imageView];

    UITapGestureRecognizer *tap =
    [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(imageTapped:)];
    [imageView addGestureRecognizer:tap];
}

And then i have:

-(IBAction)imageTapped:(id)sender {
    //something do here, but know i don't know what.
}

Should i subclass UIImageView that should contains all ThumbPosterModel params? I don’t think it is good idea, but i can’t figure any other solution.

  • 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-09T09:41:09+00:00Added an answer on June 9, 2026 at 9:41 am

    Ok this is very simple just add tag proprty of each image with appropriate and distinct value other then 0 and use that proprty to identify the image 🙂

    Happy Coding 🙂

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

Sidebar

Related Questions

I have 3 UIImageViews for which I want to load an image. For 1
I have several UIImageViews within a UIScrollView that I want to wiggle when the
I have a image wall ( UIScrollView ) and in there I have a
I have some UIImageViews that are nested in UIViews, which group them together. They're
In IB I have 2 UIImageViews, 4 UIText, and 1 TabBar. I want to
I have UIScrollView which i populate with UIImageViews programmatically. After that I change contentSize
I have a UIView that has several UIImageViews as subviews. Each of these subviews
I have a for loop that creates multiple UIImageViews that I add to self.view
I have an app that displays 9 UIImageViews, and I'm adding in the ability
I have an app that displays 9 UIImageViews, and I'm trying to add in

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.