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.
Related
I want to shift views up/down when UITable view show and hide in dropdown. Please check following views.
When I click on red button the table view opens and closes. But when it closes the space remains unused of table view. I want to shift below contents to the upward direction and vice versa. How to achieve this? If we could do it by storyboard autolayout then please let me know how to set constraints?
Below image constraint partially working -
Below image constraint will not make any difference.
Set stack to your TableView and View. So, when you hide TableView it will automatically fill the space. Also, stack will help to to use less number of constraints to manage layout.
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 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.
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
In my application, I have used UICollectionView:
Inside the collection view cell, I have a view button.
If we click on that button, another view will be opened displaying the details of the graph and an enlarged image.
The problem is that if I click on the view button in the cells present of left column i.e. first column everything is working properly, but if I click on the view button in the right side column or 2nd column cells, the detail view does not appear and they become unresponsive.
I do not understand the problem. It is working well for left side cells, then why is it not working for right side cells?
Check your view dimensions and make sure that collection view is not overlapped with other views, it seem that it is not recognisisng the ui gestures at those points..
I got the problem, the problem is i am adding the collection view to a subview named display view and then adding to the parent view, but the main screen frame width is less than the collectionview so the uievents are not recognised at that column part, so i have deleted that display view and added the collection view directly to the parent view and now it is working..