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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:30:13+00:00 2026-05-22T16:30:13+00:00

I have a grouped UITableView where the user can enter editing mode and delete

  • 0

I have a grouped UITableView where the user can enter editing mode and delete rows from the table. Each cell of the table has two UILabels. When the table enters into editing mode, the custom UILabels push to the right and go beyond the right border of the cell.

If I use the standard cell.textLabel, the label resizes and stays within the borders of the cell. Ideas about how to do this with the custom UILabels ?

  • 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-22T16:30:13+00:00Added an answer on May 22, 2026 at 4:30 pm

    You need to implement and use these two UITableViewDelegate methods:

    – tableView:willBeginEditingRowAtIndexPath:
    – tableView:didEndEditingRowAtIndexPath:
    

    In willBegin, set your UILabel frame to have a smaller width and set the width to normal size on didEndEditing.

    For example, if your UILabel is getting pushed 50 pixels out of the boundary, in your methods you do:

    - (void)tableView:(UITableView *)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath
    {
        UITableViewCell *thisCell = (UITableViewCell*)[tableView cellForRowAtIndexPath:indexPath];
    
        CGRect newFrame = thisCell.someUILabel.frame;
    
        newFrame.size.width -= 50;
    
        thisCell.someUILabel.frame = newFrame;
    }
    
    - (void)tableView:(UITableView *)tableView didEndEditingRowAtIndexPath:(NSIndexPath *)indexPath
    {
        UITableViewCell *thisCell = (UITableViewCell*)[tableView cellForRowAtIndexPath:indexPath];
    
        CGRect newFrame = thisCell.someUILabel.frame;
    
        newFrame.size.width += 50;
    
        thisCell.someUILabel.frame = newFrame;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a grouped UITableView . It has 7 rows. I wanted a transparent
I have a grouped table with 3 sections, each section with a title. The
I'm using storyboard to create a grouped UITableView . Within the table I have
I have a UITableView that is grouped into sections and has a number of
I have a grouped UITableView that has 3 sections. I would like to show
I have a grouped UITableView. I am overriding the table row height, but I
I have a grouped uitableview which has several sections. The sections are showing up
I have a small form (5 fields) in a grouped UITableView. Each UITextField is
I have a grouped UITableView and want to select some rows. Hers some handy
i have a grouped table, and if i write: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

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.