Esteban V Esteban V - 2 years ago 109
Swift Question

iOS Swift first app, controls dont appear

I have created my first app with xcode and swift followin a tutorial.
I have added a button and 2 images to the main story board.

I have also added some easy code: image description here

However when I run the app, the simulator is blank, nothing in it, and the button I know its not hidden.

enter image description here

Answer Source

There are a few things that could be wrong.

1. Your button isn't centered. You need to center it using constraints. Check out this:

2. In your IBAction, you are hiding your button. Try this:

uncoolButton.hidden = false

Or you can just remove it completely. Based on your question, it seems like you want to keep the button showing.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download