iOS : UILabel multiple lines - second line of label needs to start with 10 pixels -


enter image description here

i facing 1 issue - have 1 label "1. seibl software made company , can purchased @ $500"

when comes iphone 4s, label printing second line , second line starting under "1.". give space/margin/space label looks numbering format.

try solution. might helps you.

use nsattributedstring label, , set headindent of paragraph style:

nsmutableparagraphstyle *style = [[nsparagraphstyle defaultparagraphstyle] mutablecopy]; style.headindent = 14; nsdictionary *attributes = @{     nsparagraphstyleattributename: style }; nsattributedstring *richtext = [[nsattributedstring alloc] initwithstring:@"so uilabel walks bar…" attributes:attributes]; self.narrowlabel.attributedtext = richtext; self.widelabel.attributedtext = richtext; 

result:

example result


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -