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:

enter image description here

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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -