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 -

excel vba - VBA Proxy auto-configuration for http requests -

php - phpWord - Tables with borders in headers/footers -