Luis Valencia
Luis Valencia

Reputation: 33978

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:

http://screencast.com/t/m8DVzHNNz60Menter 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

Upvotes: 0

Views: 72

Answers (1)

Pranav Wadhwa
Pranav Wadhwa

Reputation: 7736

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: https://stackoverflow.com/a/26959256/5143847

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.

Upvotes: 2

Related Questions