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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:55:37+00:00 2026-06-09T01:55:37+00:00

I have 2 tables in one view. Table A lists a bunch of users.

  • 0

I have 2 tables in one view. Table A lists a bunch of users. Table B lists a users objects. When a row is selected in Table A, Table B is reloaded with the objects that belong to that user.

So when a user selects a row in Table A, the image in the background of the cell changes to the highlighted version of the image.

Here is the normal version of the background image:default image

Here is the highlighted version of the background image: enter image description here

As you can see, the highlighted version has a small arrow on the right of it. This arrow is beyond the width of the table cell the table itself. When the row is selected, the image changes as it should, but the image is sized down to fit the whole image into the cell.

What I would like to happen is the image goes outside of the table, or on top of the table for that selected row.

One possible solution I thought was to center the table on the selected row and then overlay that image, but if the user was to try to scroll through the table, the image would need to move and that would be a big pain.

So what I would like to know is it is possible to extend the cell’s size beyond the table one it is selected?

Thanks in advance!

EDIT:

The following does not work, just in case anyone was going to try:

[cell setFrame:CGRectMake(cell.frame.origin.x, cell.frame.origin.y, cell.frame.size.width+20, cell.frame.size.height)];

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

    Setting a views clipsToBounds property to NO will allow the view to draw outside of its own frame.

    In your UITableViewController subclass:

    - (void)viewDidLoad
    {
        [super viewDidLoad];
        // Do what you normally do here, if anything then add...
    
        self.view.clipsToBounds = NO;
    }
    

    Doing this has a side effect where you will see full cells be created at the bottom or top of the tableview instead of them scrolling partially into view. Either put the table view into another view that has clipsToBounds set to YES, align the edges of the table view with the edges of the screen, or have views covering over the bottom and top (like a UIToolbar and UINavigationBar normally would).

    To get the UITableViewCell’s selectedBackgroundView to extend past the table view’s frame create a subclass of UITableViewCell and override the layoutSubviews method.

    - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
    {
        self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
        if (self) {
            // Initialization code
    
            self.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"YQGyZ"]];
            self.selectedBackgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"CQXYh"]];
    
            self.textLabel.backgroundColor = [UIColor clearColor];
            self.detailTextLabel.backgroundColor = [UIColor clearColor];
        }
        return self;
    }
    
    - (void)layoutSubviews {
        [super layoutSubviews];
    
        CGRect frame = self.selectedBackgroundView.frame;
        frame.size.width += 13; // where 13 is the size of the arrow overhang from the same images
        self.selectedBackgroundView.frame = frame;
    
        // You can also change the location of the default labels (set their background colors to clear to see the background under them)
        self.textLabel.frame = CGRectMake(70, 0, 148, 30);
        self.detailTextLabel.frame = CGRectMake(70, 30, 148, 30);
    }
    

    Good luck.

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

Sidebar

Related Questions

I have two tables: one table (okay, it's a view), vComputer, lists many computers
I have one table view that should be filtered by values of search field
I have two database tables. One table stores data for a commitment that a
I have a table view of peoples names and when I click on one
I have a table view with numerous cells. When I press one, a tick
Using storyboard, I have a table view controller containing multiple dynamic prototype cells. One
I have 2 sections within a table view and I have loaded one section
I have two tables one with ID and NAME table 1 ID | NAME
I have 2 tables - one storing user information (id, username, password) and the
I have two tables : one table it matchs and the other is teams.

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.