uilabel
*hintlabel = [[
uilabel
alloc
] initwithframe
:cgrectmake
(autosize(10
), self
.gonextbutton
.bottom
+ autosize(5
), screen_width
- autosize(20
), autosize(80
))];
hintlabel.
numberoflines= 0
; nsmutableattributedstring
*hintstring = [[
nsmutableattributedstring
alloc
] initwithstring:@"
\n1.
填寫借款人的借款意向,即可算出借款人需要付出的費用。
\n2.
本計算結果只提供大概資料哦,具體會根據借款人房產及徵信情況而定。"];
[hintstring
addattribute
:nsfontattributename
value
:[uifont
systemfontofsize
:autosize(10
)] range
:nsmakerange(5
, hintstring.
length-5
)];
[hintstring
addattribute
:nsfontattributename
value
:[uifont
boldsystemfontofsize
:autosize(11
)] range
:nsmakerange(0
,5)];
[hintstring
addattribute
:nsforegroundcolorattributename
value
:kcolortextcolor333333
range
:nsmakerange(0
, hintstring.
length
)];
nsmutableparagraphstyle
*paragraphstyle = [[
nsmutableparagraphstyle
alloc
] init];
paragraphstyle.
linespacing
= 5.0;
[hintstring
addattribute
:nsparagraphstyleattributename
value
:paragraphstyle
range
:nsmakerange(0
, hintstring.
length
)];
hintlabel.
attributedtext
= hintstring;
[footerview
addsubview
:hintlabel];
XZ iOS之設定label的行間距
設定label 的行間距 nsmutableattributedstring setuplabellinespacewithtext nsstring text 使用方法 labelprofmpt.attributedtext self setuplabellinespacewithtext 時雨煮...
iOS 設定行間距
uilabel設定行間距 uilabel bodylabel uilabel new bodylabel.frame cgrectmake 0 0,self view dd w 120 bodylabel.text 有人說,生活如水,何必要顛簸出浪花,最後,濺了自己一身水,平平淡淡才是真。但我其實並...
View TextView行間距設定
1 設定行間距 android linespacingextra,取值範圍 正數 負數和0,正數表示增加相應的大小,負數表示減少相應的大小,0表示無變化。android id id txt msg android layout width wrap content android layout he...