Is there a way to have multiple lines of text in UILabel
like in the UITextView
or should I use the second one instead?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Xcode: Is there a way to change line spacing (UI L
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
You can do that via the Storyboard too:
You can use
\r
to go to next line while filling up theUILabel
usingNSString
.These things helped me
Change these properties of UILabel
And while giving input String use \n to display different words in different lines.
Example :
I found a solution.
One just has to add the following code:
Restored old answer (for reference and devs willing to support iOS below 6.0):
On the side: both enum values yield to
0
anyway.Use story borad : select the label to set number of lines to zero......Or Refer this
The solution above does't work in my case. I'm doing like this: