IOS Xcode Storyboard: Inserting a view behind already placed views - ios

I have a view controller with views already laid out. I need to put an UIImageView behind the views in storyboard without having to move the entire layout around. Is this possible?

Drag the new uiimageview to the top of the list on the sidebar. That should put it behind the rest of them.

There should be a little button to open another pane in the bottom left of Interface Builder. You should be able to find your view controller and adjust the layering of views or anything else on the View Controller. Best of luck!

Related

UIView inside UIScrollerView displays with -64 offset

I'm trying to create a form that will be larger than the screen size and I've decided to use a view inside a scrollerview, then I'm adding the rest of the UI widgets (textfields, buttons, etc.) inside the view.
The view displays and scrolls, but no matter what I try, it displays with a vertical offset of -64 below the navigation controller bar. Once there the view will happily scroll up down.
I want the view to anchored at the top, just below the navigation bar, and then scroll down.
I am using IB.
Lots of time researching and not many answers that have worked for me. UIScrollView seems to be like one of those dirty secrets the whole iOS world seems to avoid....
Thank you for your help.
You can fix this in the storyboard
1- Select the view Controller
2- GO to attributes inspector
3- Uncheck adjust scroll View insets
For your view controller, in the storyboard uncheck the option to extend edges under top bar.

Using Autolayout and universal storyboard super view is not taking the full screen?

I am developing an iOS application using Universal Story board and autolayout. The base views of my view controllers are leaving a space at the bottom and are not taking the full height of the screen. What could be the reason behind this?
Go to property area in the storyboard and choose your main view then select all the lines which is available in that area. then it holds the full view of the page.
It looks like your view is taking up the whole screen but is hidden behind a tab bar.
This will happen when you include them inside of a UITabbarController. The reason they reach down underneath the tab bar is because it is translucent (you can see a blurred version of the view through it).
This tutorial from Ray Wenderlich gives a good example and explanation of how to set this up in a storyboard.
https://www.raywenderlich.com/50308/storyboards-tutorial-in-ios-7-part-1
Actually the "Show Toolbar" option for my navigation controller was checked. The space at the bottom was taken by the toolbar.

conflict with autoLayout

Hi guys I got situation where in if I embed NAVIGATION CONTROLLER to VIEW CONTROLLER containing table view, their is some gap gets created between NAVIGATION BAR and PROTOTYPE CELL.
Even if I drag and drop NAVIGATION CONTROLLER to canvas and delete its ROOT VIEW CONTROLLER and connect it to the VIEW CONTROLLER containing table view as ROOT VIEW CONTROLLER, then also the same situation occurs. I even try changing the height values of PROTOTYPE CELL but the same thing.
photo link https://db.tt/up0sZypj
This situation doesn't occur only when I directly uses NAVIGATION CONTROLLER with its own ROOT VIEW CONTROLLER.
photo link https://db.tt/JssxrNbe
So please help me out of this situation.
I have given photo link because I can't attach photos as I don't have 10 reputed posts, am really sorry for that.
Try this may help you.
Uncheck option for ScrollView inset for UIViewController in which your TableView resides.
You probably have the top constraint of your tableView set to the top layout guide and have extended edges under top bars enabled.
If so you can either remove the top constraint and drag the top of your tableView to top of your superview; underneath the navigation controller. Then set the top constraint to 0 to the top of your superview.
or
You can uncheck the extended edges under top bars checkbox in the attribute inspector when the UIViewController is selected

Views resize after pushing a view controller

I'm having a really strange behaviour. When my app starts everything is fine: the size of the views on screen are exactly the one specified in the storyboard. But just as I try to push a view controller its contents are scaled, so when I pop back the view is messed up.
Any clues?
First learn about Autolayout. Here is a good way to go
Autolayout
Second I am giving you a trick which may work.
Click on viewController
If you don't want your views to extend their edges to bottom or to the top deselect Under top bars and Under Bottom bars

aligning UINavigationBar programmatically with other controls added through Interface Builder

If I am pushing a view controller onto the NavController, is there a way when designing this view to have the controls line up correctly?
Here's the issue I'm having, I had to align the TableView and MapView like so to get it to show up properly when loaded into the navcontroller:
This seems wrong. The mapview as you can see overlaps the tableview in the editor, but when it runs their lined up correctly. If I raise the mapview to line up directly on top of the tableview, when run, theres a white gap between the two. I realize the NavBar is pushing things down, or that's my guess.
Is there anything in the Utilities I can set to handle this?
You can manually tell the view controller to show a navigation bar in interface builder in the attributes inspector.
select your view, then in File Inspector, uncheck Use Autolayout. It may helps you.

Resources