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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:04:27+00:00 2026-06-02T22:04:27+00:00

When I initialize a textlabel from a static tableview cell in viewDidLoad, everything is

  • 0

When I initialize a textlabel from a static tableview cell in viewDidLoad, everything is displayed as it should be. However when I change the textvalue some moments later after the press of a button, the text is clipped if it was bigger than the original text set in viewDidLoad. When the new text is shorter, it’s being displayed correctly.

Somebody knows a solution for this problem?

— EDIT —

Solved with:

try calling the label’s setNeedsLayout method after changing the text value – that may resize the label. –

  • 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-02T22:04:30+00:00Added an answer on June 2, 2026 at 10:04 pm

    Set the adjustsFontSizeToFitWidth property of the label to YES. It will make the font smaller when text becomes longer. Also set the minimumFontSize property to a smaller value than the default.

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

Sidebar

Related Questions

Is it possible to initialize a variable from a return parameter (by ref)? Say
I'm having a problem adding an item to my tableView. I used to initialize
Question: I'm trying to access a variable from the UITableView tableView:didSelectRowAtIndexPath: delegate method. The
I want to initialize two static data members. See the two files // Logger.h
When I initialize self.nsmutableArray = [NSMutableArray array]; in my viewDidLoad method NSMutableArray initialize correctly
I'm trying to initialize a JSONObject with the following string, received from a web
I initialize data in my table with an array in viewDidLoad and then add
To initialize variables for a certain computation I have to assign them values from
I would like to Initialize a string with data from a property file in
I'm trying to initialize a tableview with an image, name and surname of each

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.