views:

79

answers:

1

Hi, everyone,

I want to ask an stupid question about the Xcode. I use the .xib to add a Label to my interface and I type something in the Label. For example, Hello World. How can I set the 2 words or 3 words in different lines?

Example:

Hello World // I don't want this

Hello // this is correct

World

Thank you very much.

+1  A: 

I'll assume you're talking about a Cocoa xib, not a Carbon xib. Draw a "multi-line label" item from the library palette into your window, and then you can get multiple lines by word wrapping. If you want a hard line break, type option-return while editing the text.

JWWalker
thank you for your reply. I am using the Cocoa Touch in the Library. And where is the 'multi-line label?
Questions
Since you only said "Xcode", I was assuming Mac OS X. Cocoa Touch (same as iPhone SDK?) may have different UI widgets.
JWWalker
P.S. I added the cocoa-touch tag.
JWWalker
@JWWalker, thank you for you reply. Ya, I am writing the iPhone application. Can it also do it as the same?
Questions