问题
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