简体   繁体   中英

Title position of UIBarButton

I want to set my UIBarButtonItem.title underneath the UIBarButton image.

在此处输入图片说明

I tried using :

myBarButton.setTitlePositionAdjustment(UIOffset(horizontal: 5,vertical: -5), for: UIBarMetrics.default)

the text doesn't show though. Any ideas? It is not possible for me to integrate UITabBar just in case this is your answer.

You can adjust your button's title and image with "Size Inspector". Size inspector found in "utilities area".

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM