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

The Archive Base Latest Questions

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

I have a UILabel and it should display the text how much long it

  • 0

I have a UILabel and it should display the text how much long it would be .So gone for the concept of UILineBreakModeWordWrap but it is not working for me ..If the text doesnot fit in that line then it should automatically should appear in the next line

UILabel *lblMyLable = [[[UILabel alloc] initWithFrame:CGRectMake(10,118, 600, 40)]autorelease];
    lblMyLable.lineBreakMode = UILineBreakModeWordWrap;
    lblMyLable.numberOfLines = 0;//Dynamic
    lblMyLable.tag=1301;
    lblMyLable.backgroundColor = [UIColor clearColor];
    lblMyLable.text = [NSString stringwithformat:@"%@ %@ %@ %@ %@ %@",id,name,address,city,state,country];
    [self.view addSubview:lblMyLable];

But here after displaying the id ,name and address the remaining part is cut ..I couldnot see
it ..I am searching in such a way that if doesnot fit one line then it should automatically jump to next line starting from where it was stopped in first line.How can i do it?

  • 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-13T01:46:17+00:00Added an answer on June 13, 2026 at 1:46 am
    NSString *str = @"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sh";
    NSString *str1 = @"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sh";
    NSString *str2 = @"xyz";
    NSString *str3 = @"xyz";
    NSString *str4 = @"xyz";
    NSString *str5 = @"xyz";
    NSString *str6 = @"xyz";
    NSString *str7 = @"xyz";   
    
    UILabel *lblMyLable = [[UILabel alloc] initWithFrame:CGRectMake(10,10, 200, 40)];
    
    lblMyLable.numberOfLines = 0;
    
    lblMyLable.backgroundColor = [UIColor clearColor];
    
    lblMyLable.text = [NSString stringWithFormat:@"%@,%@,%@,%@,%@,%@,%@,%@",str,str1,str2,str3,str4,str5,str6,str7];
    
    [lblMyLable sizeToFit];
    
    [self.view addSubview:lblMyLable];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UILabel which should have transparency (alpha) = .6 but Text of
I have a UILabel and i have a uint16_t. How can I display the
I have a UILabel with space for two lines of text. Sometimes, when the
I have a UILabel with right-aligned text that may vary from between three to
I have an UILabel that I want to contain a preview of a long
Is there a way to have multiple lines of text in UILabel like in
I have a UILabel with some text on it, what I want is if
I have a UIPickerView with 2 components. I want a UILabel to display the
I have been working for several of hours on an simple animation but nothing
I have a UILabel, his text size has the property title.adjustsFontSizeToFitWidth = YES; 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.