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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:30:15+00:00 2026-05-17T01:30:15+00:00

I have a somewhat long string that gets truncated when displayed in a tablView

  • 0

I have a somewhat long string that gets truncated when displayed in a tablView cell. I did this to make the table view wider:

tableView.rowHeight = 100;

How can I make the font smaller as well as wrap the text in the table view cell?

  • 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-17T01:30:15+00:00Added an answer on May 17, 2026 at 1:30 am

    In tableView:cellForRowAtIndexPath: you can set a few properties on the textLabel (or descriptionLabel, depending on what style of cell you’re using) to do this. Set font to change the font, linkBreakMode to make it word-wrap, and numberOfLines to set how many lines max (after which point it truncates. You can set that to 0 for no max.

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
        UITableViewCell* aCell = [tableView dequeueReusableCellWithIdentifier:kMyCellID];
        if( aCell == nil ) {
            aCell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kMyCellID] autorelease];
    
            aCell.textLabel.font = [UIFont fontWithName:@"Helvetica" size:10.0];
            aCell.textLabel.lineBreakMode = NSLineBreakByWordWrapping; // Pre-iOS6 use UILineBreakModeWordWrap
            aCell.textLabel.numberOfLines = 2;  // 0 means no max.
        }
    
        // ... Your other cell setup stuff here
    
        return aCell;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a somewhat-long-running stored procedure being called from a PB application. I want
I have a method somewhat similar to the one written bellow(this is just a
I think I've just been looking at this too long. I have some data
I have a 'black box' application that gets a map of values as parameters,
I have a SQL question that I could use some help with. Still somewhat
I have a function that should be passed a string with two numbers (as
I currently have this huge and slow code that takes forever to run.... Im
I have a somewhat long-taking WCF-based process. WCF service runs in Azure if its
Assuming I have a table like this one: CREATE TABLE user_delegates ( [id] INT
Lets say that I have a table containing users . Each row in that

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.