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

  • Home
  • SEARCH
  • 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 8771595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:49:46+00:00 2026-06-13T17:49:46+00:00

Original I am currently working on an app where the user can resize the

  • 0

Original

I am currently working on an app where the user can resize the font in a UITextView up to 50pt. As it stands they can also edit the text in this UITextView with as many characters as they like (my boss wants to limit any kind of prescriptive behaviour). The UITextView then dynamically resizes vertically to cater for the amount of text. All well and good. However, once the height of this UITextView exceeds a certain size, any subsequent characters will be added but will be hidden from view, unless I allow the UITextView to be scrollable.

I would have to add that this is an edge case. However, because the app encourages this sort of behaviour there is a possibility that this limit could be encountered occasionally.

Am I right in thinking there is actually a limit on the height for a UITextView? Or is the issue potentially something else?

Edit

Okay maybe I’m misunderstanding my own situation. I failed to consider the fact that the textView sits within a tableViewCell, and what I am actually doing is resizing the cell as the textView size increases. Is there a limit on the height of a tableViewCell then?

Answer to my issue

Thank you @jere and @A-Live for your answers they helped a great deal. I know feel like such an idiot.

A-Live pointed out about max float values and that suddenly made me realise such an obvious and blatant mistake I had made.

In order to resize the textView appropriately a CGSize is established using constraints. In order to ensure the height was allowed to be as high as it wanted, a supposedly unreachable high number was used for the height constraint (1000). As you can guess, 1000 was not enough for the purpose of this and therefore the textView was stopping short. I guess this is why it is important to provide code.

CGSize textSize = [textView.text sizeWithFont:textView.font constrainedToSize:CGSizeMake(textView.frame.size.width - PADDING * 2, 1000.0f) lineBreakMode:UILineBreakModeWordWrap];

The most accurate answer to the updated question is @jere, and because this has been pointed out to me I will have to prevent the cell size from ever reaching that magic number of ‘2009’.

  • 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-13T17:49:47+00:00Added an answer on June 13, 2026 at 5:49 pm

    Note that if you want to set the height for only some cells and not all, you have to use the delegate method - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath and return the height you want for your row there.

    You could also use the rowHeight property but that applies to the whole table view.

    Now here’s an interesting part of the Apple docs regarding the delegate method:

    Important: Due to an underlying implementation detail, you should not
    return values greater than 2009.

    So I guess that must be the max value or something. It would be kinda crazy if your cell goes beyond 200 or 300px anyways…

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

Sidebar

Related Questions

I'm working on an app that can be downloaded and, once the user runs
I'm currently developing an iPad app where a user will enter a photo filename
I'm currently working on converting an Android app I built natively as an iPhone
I am currently working on configuring my CakePHP (1.3) based web app to run
I'm in the process of making a music app and I'm currently working on
The app I'm currently working on was originally developed by someone else on another
I am currently working with an app that allows for runtime addition and removal
I am currently working on an app that will display images on the camera
Currently, every comment has the same date as the original post. Theme functions PHP:
My company has a desktop app originally developed for Windows XP. The original programmer

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.