Minimi
Minimi

Reputation: 961

IOS UITableView right half cut off screen

For some reason, no matter what I do, when I create a static tableview inside a UITableViewController, put content into the cells and run the simulator the right half of the screen is always cut off and I don't know why. Ive tried making new projects and remaking the storyboard but nothings working.

Here's what it looks like when I run the app

enter image description here

heres what the storyboard looks like. enter image description here

I have content set to static cells

Anyone run into this problem or know how to fix it via storyboard (or programmatically but not preferred)?

Update:

Here are some more pictures of what another project looks like when I run it:

enter image description here

and here's what the storyboard looks like

enter image description here

Upvotes: 2

Views: 821

Answers (2)

Kalaivani
Kalaivani

Reputation: 424

I see the problem in giving constraints to the table not for the button. Try giving constraints to the table like "leading space to superview,trailing space to superview,top space and bottom space to superview

Edit: The above solution given by me might fix for tableview inside UIViewcontroller.

Upvotes: 0

Bhavin Bhadani
Bhavin Bhadani

Reputation: 22374

You need to give constraints to your right button...

For that select your button and pin its edges to right, top, bottom and give width constraint like below

enter image description here

and here is autolayout tutorial link .. you can check that

Upvotes: 4

Related Questions