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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:17:36+00:00 2026-05-20T06:17:36+00:00

I have a tableview which each row has 4 images. I have implemented a

  • 0

I have a tableview which each row has 4 images. I have implemented a share option which will allow the user to select multiple images. How can I add an overlay or some kind of visual effect to show that the image is selected?

enter image description here

I would like to add some overlay to display that an image is selected, but How would this be done without adding a new set of subview for each thumbnail? And once that is done, how would the selection of the new views be linked back to the images behind them so that they can be added to an array?

Or is there an easier way to do this?

Thanks

  • 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-20T06:17:37+00:00Added an answer on May 20, 2026 at 6:17 am

    Depending on how you’re implementing this grid view, it might make sense to track all of the selecting and deselecting at that level.

    As for the overlay, the quick and dirty way is to subclass UIImageView, add a BOOL property called selected. Then you can override the setter for selected and handle showing or hiding your overlay view.

    Here’s how I would setup my subclass. First the interface:

    @interface SelectableImageView : UIImageView
    
    @property (nonatomic, assign, getter = isSelected) BOOL selected;
    
    @end
    

    and the implementation…

    @interface SelectableImageView ()
    
    @property (nonatomic, retain) UIView *overlayView;
    
    @end
    
    
    
    @implementation SelectableImageView
    
    @synthesize selected;
    @synthesize overlayView;
    
    - (id)initWithFrame:(CGRect)frame
    {    
        if (self = [super initWithFrame:frame])
        {
            overlayView = [[UIView alloc] initWithFrame:frame];
            overlayView.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.75];
            overlayView.hidden = YES;
            [self addSubview:overlayView];
        }
    
        return self;
    }
    
    - (void)setSelected:(BOOL)flag
    {
        selected = flag;
        self.overlayView.hidden = !flag;
    }
    
    - (void)dealloc
    {
        [overlayView release], self.overlayView = nil;
        [super dealloc];
    }
    
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my iPhone application I have a table view. When user taps any row,
I have a UITableView with 5 UITableViewCells . Each cell contains a UIButton which
I have set up a UITableView-based app, which has a .plist for holding the
I have TableCellViewController for managing cells in my UITableView. Each cell has a label
I have a grouped table view with textfields in the tableview. For the keyboard
I have built a simple Eclipse plugin where a user may use a TableViewer
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have a string of 3 queries that are designed to Find which messages
I have this code to set the background image of the UITableViewController: self.tableView.backgroundColor =
I have problems with my coredata sqlite DB, which hosts a book DB. After

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.