简体   繁体   中英

Cant add title to Custom UIButton?

hey Guys i've got a weird problem. If i create a custom button inside the storyboard editor and want to add a title to it, it appears right to the Button, but it should be placed centered on top of the button. I checked all the preferences and cant find out why it doesnt work. Any ideas why it behaves like this ?

It worked for me using Xcode 4.5, take a look at the screenshot:

在此处输入图片说明

You should check out the Alignment properties under Control (shown at the bottom right hand corner). If you select the center option for both Horizontal and Vertical you should have the same result as the image shows.

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