I have a table view cell inside of a view controller in Xcode storyboard. The cell is formatted 'Right detail' with a Title on the left and Subtitle on the right. It looks like the cell is too wide for the screen - and the Subtitle information has rolled off the side of the screen. I'm on Xcode 6. The table view looks like this
But it should look like this
Is there some formatting option I could check so that the information fits neatly in the table view screen? Thanks for any advice.
Open the resolve layout issues tab at the bottom right, above where the debug panel goes and select Reset to suggested constraints with your tableview selected. If that doesn't work then you'll need to constrain the right side of your tableview to the superview manually, this can be done by control dragging (like an IB connection) from the superview to the tableview and selecting the appropriate constraint in the scene hierarchy to the left of your storyboard editor.
Related
I am using SWRevealViewController to show front and rear view. Inside rear view I am using full view Mode and insert table view, but table view cell content is not lies in the middle of screen. it little swap to the right side. I have tried almost every thing, from storyBoard I have used Auto layout and inside cell.m file inside layout subview class but no result.
But when I tap on cell content it appears in the middle of screen, As I wish. please suggest me so if this screen load content appears in the middle of screen of tableview. Your suggestion is highly appreciated. enter image description here
[
you can see how weird it looks
Now I got the answer, we can edit the sw reveal rear width to screen size and same applied to table view size, In this way we can bring the content of tableview in the middle of view enter image description here
I am working on a project to get custom news feeds from Bing news. I created a custom table view cell and populated various UI items in it. But I am having a hard time to make it occupy the entire screen, it starts from extreme left and ends on the right, leaving large gap from the right margin as show in the image. Can anyone help me out, how to correctly fix it with a detailed explanation of how constraints work in Table views and Tableview cells.
Here' what it looks like in the simulator
Remove previous constraints and add constraint to your UITableView like as shown in below image.
So you UITableView will have 0 margin from edges.
Create a UITableViewController. Just drag drop a TableViewCell into it. Add identifier for that cell and use it. By default it will occupy the whole screen.
In your case I guess you might have added constraints to UITableView. Here what you should do is pin your UITableView to Top,Bottom,Right & Left or make UITableView's width equal to SuperView.
I'm having trouble setting a layout for my iOS app. The entire app is shifted right for some reason as you can see by the label and buttons which are in the middle of the scroll view.
I also can't seem to display the entire table. In the screen shot below "another Item" is supposed to have a checkmark and it is only visible if I shift the table in Main.storyboard far to the left where the actual label for the cell item is half visible.
I have a scroll view inside of the view controller and then a label and three buttons as well as a table view with table view cells.
Thanks to Lucas for the answer
Are you using Auto Layout with that storyboard? Looks like you might not have set your constraints up properly. You might also want to take a look at Xcode's new View Debugging functionality.
I have in the bottom of the screen a view containing 4 image views that I use as navigation buttons. That view is pinned to bottom layer by "0". Now my tableview is above this view and I have made a constraint of "10" from tableview to my "navigation view." I have two problems. When my tableview contains more rows than the screen can hold it puts the cells "behind" my "navigation view" even though I made the constraint it shouldn't. Now when I flip the screen to landscape mode it actually makes my navigation view disappear from the screen. I don't understand why as I pinned the bottom view to bottom layer. (2 questions)
Then of course my 2nd row decides to use much bigger font when I load in more rows, which is something I don't even want to bother you guys with yet, I think my simulator is playing tricks with me..
Anyway, I appreciate any help on my 2 problems above. Thank you
EDIT: Here I took some pictures:
http://i.imgur.com/LA9Spt0.png (this shows what i mean with the tableview pushing away the lower view even though the lower view is constrained to the bottom layer and the tableview has a constrain leading to the lower view (menu bar))
http://i.imgur.com/b6VoqFk.png Here what happens when I "pull" the tableview downwards to see more cells it blocks the upper label and top bar (which contains the logo I had to remove for reasons with the company) I tried to use :setBounces and setAlwaysVertBounces set to NO but then I can't scroll down the tableview when more cells exist.
(addition to img. nr 2)multiple cells makes the cells hide behind the lower menu navigation bar. I did make a constrain between the tableview and lower menu bar, shouldn't I be able to make the tableview "create" a scroll bar so u can scroll down instead of cells hiding behind the menu bar.
Thanks, any help much appreciated!
It sounds like you have some conflicts, or missing constraints.
You can see if you have constraints errors in the nib, in the 'view hierarchy' column in the left side of your nib, you will see a little red arrow..
Or that you have some conflict which you can see at the console when running you app.
Thanks
Storyboard had great feature to design tables of static cells.
Until XCode 5 is was possible to compose long list of cells and scroll the table to edit them.
With XCode 5 the scrolling simple stopped working - instead of scrolling the table, now it scrolls entire the storyboard.
Did anyone solved this problem?
I'm completely stuck with my long tables of static cells...
In the storyboard view uncheck Under Top Bars with the problematic scroll view selected.
This allowed me to scroll all the way down.
This only occurred in one of my views, so still not sure what it happens.
I just tried it in my XCode 5. After selecting one of the other not covered table cells I am able to scroll down to the other hidden table cells. Does this work for you too?
Similar post, maybe this helps you too:
Can't scroll to the bottom of a long Static TableViewController in XCode 5 Interface Builder to edit the cells below the fold
Here are the steps that I have found to work:
Select the TableViewController in the Document Outline (view to the
left of the Storyboard).
Click on the Status Bar (or somewhere along the top) of the
TableViewController so that the entire TableViewController is
selected in the Storyboard View.
Use the scroll wheel on your mouse or the "2-finger scroll" on the
trackpad.
The scroll bars on the side of the Storyboard View only seem to move the storyboard around.
It also only seems to work if the mouse pointer is hovering over the TableViewController.
Using Xcode 5.0.2 (5A3005)