ios - How to adjust the baseline shift for a UiLabel? -
my app using custom font display information whole app.
but there problems base line in image below:
i need fix "x 4" centered in vertical red box.
how can fix this?
you can create uilabel
, set size same red box. , set it's text alignment center:
youlabel.textalignment = nstextalignment.center
another not option make uibutton
of same size red box , set userinteractionenabled
no
. way text positioned in center horizontally , vertically. can set it's setcontentverticalalignment
property
Comments
Post a Comment