IOS 7.1: UIButton's selected title not working [duplicate]

拥有回忆 提交于 2020-01-03 15:25:22

问题


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:


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.

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.



来源:https://stackoverflow.com/questions/22320964/ios-7-1-uibuttons-selected-title-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!