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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
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. Setfontto change the font,linkBreakModeto make it word-wrap, andnumberOfLinesto set how many lines max (after which point it truncates. You can set that to 0 for no max.