Button label disappears when highlighted

I am working on the Bull’s Eye app in the ‘iOS and Swift for Beginners’ online tutorial. I am at Chapter 5, Lesson 41, Styling with Buttons and Sliders.

After I have stylized the ‘Hit Me!’ button in both the Default and Highlighted states, when I click on the Highlighted checkbox in the Inspector, the label of the button disappears. I’ve tried to figure out why this is occurring but have been unsuccessful. I also quit and relaunched Xcode (10.2.1) and still no joy.

Possibly related, I’m now on the lesson to stylize the Info screen. When I change the settings or the Close and About the Author buttons the button text is placed to the right of the button instead of on it. I have no clue why this is happening.

EDIT: I figured out both of the above problems. I was setting the Image instead of the Background of the button to Button-Normal. After I switched this the button text correctly appeared on the button, even when highlighted.

1 Like

@slgraff Really glad you fixed it! Cheers! :]

Need to enable selected state.

This topic was automatically closed after 166 days. New replies are no longer allowed.