I have a cell which may have to display a long text. In this case it should wrap to a second line.
I have Lines set to 2 and Line Break set to Word Wrap in the attributes Inspector. The Interface Builder preview confirm that and behaves as expected/desired.
When building and running however the text is limited to one line and truncuates at the tail:
Other changes in the attribute inspector seem to have no effect aswell (text alignment for example)!
Wrap text automatically On the Home tab, in the Alignment group, click Wrap Text. (On Excel for desktop, you can also select the cell, and then press Alt + H + W.) Notes: Data in the cell wraps to fit the column width, so if you change the column width, data wrapping adjusts automatically.
The correct answer is Word Wrap. Word Wrap is the tool used to wrap text to the next line as it reaches the right margin in MS Word. When the right margin is reached while typing, a word processor's Word Wrap feature will automatically force content to a new line.
Select Format and then under Arrange, select Wrap Text. Choose the wrapping option that you want to apply.
Wrap text in a cell or group of cellsText inside the cell wraps to fit the column width. When you change the column width, text wrapping adjusts automatically. Note: If all wrapped text is not visible, it might be because the row is set to a specific height.
If anyone is still having the problem.. Here's the solution for swift 4 Xcode 9 iOS 11
inside the cellForRowAt tableview function you just have to add a single line of code
cell?.textLabel?.numberOfLines = 0
For getting the lines without the dots, Do the following -
I think this will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With