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

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

SQL Server - MyCTE query based on 24 hour period (next day) -

php - Using str_replace to translate a MySQL Table in html -