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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:38:21+00:00 2026-05-30T15:38:21+00:00

I have a UITextView embedded inside a grouped table view cell that I can’t

  • 0

I have a UITextView embedded inside a grouped table view cell that I can’t seem to update on rotation. It basically keeps the same width (assumed portrait) when it becomes landscape, causing about 40% of the view to be blank on the left side.

Is there a way to update this easily? I was looking at willRotateToInterfaceOrientation but I wasn’t sure if that was the right thing to update the view on rotation.

Specifically, I’m thinking the width value should be updated, since it’s based on the width.

if (indexPath.section == 1) {
        switch (indexPath.row) {
            case 0:
            {
                NSString *label = [self.pedal detail];
                CGFloat width = [UIScreen mainScreen].bounds.size.width * .95;
                CGSize stringSize = [label sizeWithFont:[UIFont systemFontOfSize:15]
                                      constrainedToSize:CGSizeMake(320, 9999)
                                          lineBreakMode:UILineBreakModeWordWrap];
                UITextView *textField = [[UITextView alloc] init];
                [textField setFrame:CGRectMake(50,0, width-10, stringSize.height+55)];
                [textField setEditable:NO];
                textField.backgroundColor = [UIColor clearColor];
                textField.font = [UIFont systemFontOfSize:15];
                textField.textAlignment = UITextAlignmentLeft;
                cell.accessoryView = textField;
                textField.text = [self.pedal detail];
                [textField release];
                break;
            }
        }
    }
  • 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-30T15:38:22+00:00Added an answer on May 30, 2026 at 3:38 pm

    You need to set textField.autoresizingMask = UIViewAutoresizingFlexibleWidth, which streches the object on its width on view size change.

    Read more at the UIView documentation

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

Sidebar

Related Questions

I have view a that has a table cell and a save button. If
I have a UITextView inside a UITableViewCell . It's working as expected except that
I have a UITextView on a View that becomes the first responder. When I
I have a UITextView that is editable on a parent view along with a
I have a UITextView subclass that has an NSIndexPath property that is inside a
I have a UITextView that has a lot of content. I have a button
Setup: I have a UITextView inside a UITableViewCell 's contentView . I want it
I have a small iPhone Project with a UITextView on my View, designed in
I have some text in a UITextView, that I would like to have show
I have a UITextview delegate - (BOOL)textView:(UITextView *)textView that is never getting called and

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.