Stack layout doesn't reflect on the simulator properly - ios

Here, I tried to show two labels on the screen in table view cell using stack view But When I run it on the simulator it does appear on the screen as it is designed on the storyboard (leading space does not reflect on the simulator).
StoryBoard
Simulator

Related

Margin on Master View Controller on iPhone only

I have created a Master/Detail app not using the Apple Default's Template but by simply clearing the storyboard and dragging a split view controller to there.
I select the split view controller and configure it like this:
The table view controller cell inside the master has only one image view that is 240x180 points.
This image view is configured to have the Content View width and height and be centered.
When I run this project this is how I see the master view controller
On the iPad
On the iPhone
for some reason on the iPhone version the image is not filling the whole cell and is shifted to the right.
This red band is the color when the cell is selected.
I love how these APIs do not work consistently across devices.
The same Table View Controller, the same project, shows differently on iPhone and iPad.
The red rectangle is the selected background view, that I have set to red, so when the cell is selected a red rectangle shows around. The problem is that there is an old iOS bug that makes the selection background view to cover the cell content partially.
Apparently the bug happens on the iPhone, but not the iPad.
To solve the problem, turn OFF this Insets To Safe Area on the Size Inspector of the Table View. This is turned on by default when you create the table.

Double Navigation Bar in View

I have a problem with a "double" navigation bar in a screen of my iPhone app.
Starting position:
Xcode 8, Swift
I have a TableView with static lines that is embedded in a navigation controller. From the first cell I then call a screen (Segue Show Detail), which is very complex (labels, text boxes, buttons, etc.). When I execute the "Reset to suggested constraints" function on the screen, the screen is supplied with "generated" constraints. This is still clear. When I run my app in the simulator (iPhone 6) or my own iPhone 6, I see on the above screen a status bar, then my right navigation bar (Back button, title) and below an "empty" 2.Navigation bar. This decreases the screen down and is no longer fully visible. If I delete the constraints for the screen with the "Clear Constraints" function, the screen in the simulator (i6) looks good as I develop in the storyboard for the iPhone 7. But when I connect my own iPhone 6 and test, the screen does not fit completely to my iPhone, because right and down is something truncated.
I suspect the error in the "generated" constraints.
Now my question:
How can I check the generated Contraints (well over 100) for errors?
In the Internet and the forum I found nothing, which could help me.
Workaround for me:
The top UI element on the screen is a label across the entire width of the screen. For this label, I set a constraint manually, in addition to the generated constraints
Label.top = Top Layout Guide.bottom + 44,
whose value I then change to the value
Label.top = Top Layout Guide.bottom
This causes the label to slide directly below the status bar in the storyboard. The navigation bar is then no longer visible in the storyboard. This makes the placement of UI-Elements at the bottom of the screen somewhat more difficult because you do not know exactly which space is still available.
The display in the simulator (i6) and on my iPhone 6 looks however through the workaround ok.
For your help I would be very grateful.
Greeting Reinhard

Xcode storyboard - can't drag to make constraint, items disappear when switch between size classes

In my project I want the iPhone portrait version to stretch a view but the landscape and iPad version to have a specific width so it doesn't stretch since the iPad is wide and so is iPhone in landscape. The problem is, when I set one up, I switch to the other one and everything has disappeared. If I start dragging views from the left panel to the storyboard they appear again, but when I switch to the previous size class everything has disappeared on that one. I also can almost never drag on that ViewController's box to do what I want. For example, if I want to drag from a UIButton to the background of the layout it would normally bring up a menu with 'vertical spacing' etc but now it comes up with 'Outlets Delegate'.
How do I fix these issues? Nothing is working.
Solved it by deleting everything in the ViewController, re-adding everything in w-Any h-Any and adding specific constraints in the relevant size classes.

Storyboard ui elements don't appear in Xcode 5

I have transitioned my iPad application from iOS 6 to iOS 7 and I had to turn off auto layout or the whole application would crash when I selected to view the storyboard.
Now that I can view it, all the uielements don't appear in the each storyboard screen.
The screens are there but they are blank (white). The editor shows that they are there but I cannot view them at all.
Try changing the width and height/ x and y coordinate of the views. That fixed the same problem for me.

ios - why do the screens on the storyboard look different (space inserted) that when I run the program?

I have this screenshot of my storyboard which looks ok, and then the simulator which has some weird whitespace block on the screen.
The simulator is retina 4-inch ios6 simulator. Is this not a correct simulator? Or is there something else I am doing incorrectly?
Thanks!
There could be two problems here.
Your constrains or springs and struts are set wrong.
Inside of Interface Builder your scroll view is scrolled down. If you have more content in a scroll view than what can be held in that scroll view, then you can scroll within that scroll view.
More than once, I've confused myself because a particularly large table view wasn't showing the table cell prototype I was looking for. My storyboard is big and I would end up hunting around for it until I realized that it's merely scrolled off the bottom.
Retina 4-inch corresponds to iPhone 5 but your storyboard's controllers view are setting for Iphone 3/4
Notice the 7 bottom right buttons inside your storyboard. Out of those 7 buttons, the one on the extrem left, will toggle your storyboard views for 3.5-inch to 4-inch displays. Since currently your storyboard is set for 3.5-inch display but you are running on a 4-inch simulator, thats the reason for the inconsistency

Resources