IOS 7.1: UIButton's selected title not working

2019-06-22 15:53发布

This question already has an answer here:

Today I upgraded my iPhone OS to iOS 7.1.

Everything looks good in the new iOS, but I have a critical issue regarding UIButtons in the app I'm working on.

The selected state was gone in every button. For instance, Like button has title of "Liked" when selected but it's not shown at all when selected right now. Buttons have only text without background/image in every state. I tried to build and test the app in Xcode 5.1, but still can't see the selected states in buttons.

Does anyone else have this issue or could help me solve it?

1条回答
迷人小祖宗
2楼-- · 2019-06-22 16:20

Fixed it! Finally I was able to fix it and it was because of improvement of UIButton behaviour in iOS 7.1.

They just started rendering round-rected shape filled with tint color when UIButton is selected. enter image description hereenter image description here

It was semi-transparent one in iOS 7 and I remember that I put clear color just to make the buttons clear to see. That was the issue and they rendered transparent rectangle around the buttons and we're unable to see anything when selected at all! Hope this would help others who have the similar issues.

查看更多
登录 后发表回答