vicaba
vicaba

Reputation: 2876

Xcode, Button not showing on UITableView (Basic level)

I'm having a problem performing a basic action in xcode. I want to add a button to a TableViewCell using the storyboard. I'm able to add it: drag and drop from the palette. But it is supposed to be shown when I run the app right? isn't it? I see the TableView, I see a label I've putted in the cell but I don't see the button. That's very annoying.

This is how it looks in the storyboard: enter image description here

Upvotes: 1

Views: 1087

Answers (2)

villy393
villy393

Reputation: 3063

Have you tapped the "Debug view hierachy" button to see whats going on in the view. The button shows at the bottom when you have an app running in debug.

enter image description here

Upvotes: 2

LinusG.
LinusG.

Reputation: 28892

This ViewController's size probably does not match the simulator's or your device's size. That is why the button does not appear.
Make sure to either add constraints when using AutoLayout or setting the button's position in code.

Hope that helps :)

Upvotes: 1

Related Questions