2011-01-19 7 views
0
We have label with text in 2 lines. In second line the text is not aligning exactly to the left as in the first line. we had set property for the label as number of lines = 0. 

例: label.text = @ "これはラベルのテキストです。"iphone SDKのラベルのテキストアライメントの問題

結果では私たちは、ラベルの

This is the text 

としてこれを取得しています。

しかし、我々は、ボタンのワードラップを設定

This is the text 
for the label. 

答えて

1

試みとしてこれをしたい:

[label setNumberOfLines:0] 

編集: はちょうどラベルの改行プロパティがあります実現、

label.lineBreakMode = UILineBreakModeWordWrap; 
を助けるべきです
関連する問題