Reputation: 16841
I dragged a uitableview
component to my UIViewController
in the Storyboard
.
It appears as
Then when I ran the application, there's a space on the side. How to prevent this?
Note: Initially this application was enabled autoLayout, and I removed it later on. Hope there's no effect for this error.
Upvotes: 0
Views: 145
Reputation: 1607
The answer on this link will surely help you.
https://stackoverflow.com/a/26708486/3396270
Though its Table view in your case you can use it with all the components by changing the settings as per their requirements.
Upvotes: 1
Reputation: 1540
What version of the xcode are you using? If it's okay with 5s and not okay with 6 and 6+ then you should change the size of the table manually or use autolayout. Storyboard which you'v used should have optimised for devices below 6. I you're using @3x image for splash screen then your app supports 6 and 6+ but it uses the same table size as what it is designed for 5s device size on simulator.
Solutions-
I have released an app using the above 2 solutions and its in the store now.
Upvotes: 0
Reputation: 5343
If you are not using AutoLayout
then just write this code in your viewDidLoad
Method
[tableView setAutoresizingMask:UIViewAutoresizingMaskFlexibleWidth | UIViewAutoresizingMaskFlexibleHeight];
You could also set the AutoresizingMask
from your nib
file.
Upvotes: 0
Reputation: 6040
Add constraints on your tableview.
If you don't know how to, here is a simple step by step :
tableview
(on the left side list) to
View
. Bottom
space to bottom layout guide
Leading space to
container margin
Trailing space to container margin
That should fix your issues.
Upvotes: 1
Reputation: 649
If you uncheck the Translucent
property of your Navigation Bar, it's going to fix it.
Upvotes: 0
Reputation: 1521
Check your screen size in Storyboard
:
And make sure you are running the application on same size of Simulator as in your storyboard
.
Upvotes: 0