Storyboard ui elements don't appear in Xcode 5 - ios

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.

Related

How to set Safe Area layout for older Apps?

I just started working on a new project which has been done when Xcode 6 was released. The previous developer has used a View instead of the navigation Bar at the top of a few views. I want to fix the height of the View at the top for the new iPhone X as the navigation view looks very small and is cut by the notch. And as the project was created earlier with Xcode 6 I don't see Safe area, is there anyway I can update my previous XIB's with Safe area without requiring to recreate them all ?
The other option I have is creating a new XIB and optimize it for iPhone X layout and call it when the view is loaded.

White bar on bottom of app Xcode

How can I remove the white bar at the bottom of my mobile app? I've tried the solution of adding a Launch screen in the Launch screen file but that didn't work. I've attached an image.
Just for a bit of context, I'm using a PageViewController to slide between 3 pages.
Any help appreciated.
It looks like you add static size view on the iPhone 6 screen in xcode UI constructor but launch it on the iPhone 6s Plus (with bigger screen).
To scale this view properly you should turn on Use Auto Layout in the Utilities bar and add constraints to the view
Make sure that the blue-colored view is properly constrained to the bottom of its superview.

Storyboard preview issue after converting to Swift 3/Xcode 8

Something strange happened to my project after I upgraded to Xcode 8 and converted the project to Swift 3.
Most interesting thing is that layout shows fine in the simulator but in the Preview everything is shifted to the right. Center of all devices appears to be almost at the right edge. For example I drag a label to the storyboard select Align Horizontally and add a constraint to the top... in preview it shows up for all devices shifted to the right instead of in the middle but in the simulator label is in the middle, exactly where it is supposed to be.
Also, if I create a new ViewController is would work just fine in preview and simulator... Anybody knows what can cause this issue?
In Interface Builder, select the view controller and then choose "Update Frames" from the "Resolve Auto-Layout Issues" popover menu that is in the lower right corner of the Interface Builder canvas. The issue is that in Xcode 8, the size of the previewed scenes has changed. If you tell it to "Update Frames", the various subviews should be adjusted to reflect the new "simulated size" for the scene's top level view (assuming all of your constraints are properly defined).
Leaving Xcode and re-starting worked for me to get the correct view per device in Storyboard again.

XCode 7 and iOS 8 Auto Layout top constraint issue

I recently updated my XCode 6.3 to 7 and strange things started to happen with my auto layout constraints in the storyboard.
My app uses UITabBarController with three tabs. The initial tab has a UICollectionView with top constraint set to 44px from the top layout guide (there is a toolbar in the embedding UINavigationController.
When I run the app on iOS 7.1 (iPhone 4), everything looks fine. The collection view doesn't go bellow the toolbar. However in iOS 8.4 (iPhone 6) the collection view goes bellow the toolbar UNLESS I switch tabs and go back to the first one, where the collection view is positioned where it should be.
What I did:
Unchecked all "Extend edges under...." for every view controller in the chain
Set all simulated metrics for Status/Top/Bottom bars to "None" in every view controller in the chain
I had the idea to check for #available(iOS 8.0, *) and extend the constraint constant +20 pixels. But when I switch back to this tab, the collection view goes 20 pixels lower than where it should be.
So, I guess something happens to the view controllers when I switch tabs. What is it? Or is there any solution. I'm on a deadline and this is the only problem I have with my app.
p.s. I can provide source code and XCode screen shots if needed. But still, I think it's something more theoretical, than practical.
1) click on your UITabBarController in storyboard->identity inspector
2) uncheck "Adjust Scroll View Insets"
repeat for individual view controllers inside UITabBarController
Sometimes this happen also to me. I suggest replacing the top layout constraint with an height constraint equal to the view of the ViewController, this resolved my problem.

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