Questions tagged [uicontainerview]

There is no public UIContainerView class in Cocoa Touch, but there is a pattern that uses a UIViewController as a container for one or more child view controllers. This pattern is also in the object library of Interface Builder in Xcode with the name Container View.

You can drag a Container View for the object library into a view in a Storyboard scene. This will create a new view in the scene and creates a new view controller object which is connected with the container view by a segue. The view of this new view controller is displayed in the connected view.

The class UIViewController supports nesting of child view controllers. The documentation contains also a section about Implementing a Container View Controller programmatically.

648 questions
7
votes
1 answer

IBOutlet for element in containerview inside original viewcontroller

In my main view I have two containers that have an IBOutlet in view controller. In both the containers I have a an image and a label as in the picture below. I want to have an IBOutlet to change the image and label but when I drag it to the…
Nicholas Muir
  • 2,897
  • 8
  • 39
  • 89
7
votes
4 answers

UITextview is getting randomly clipped when using Autolayout and or preferredFontForTextStyle

Autolayout will randomly clip the text in my UITextView. It changes the size of the UITextContainerView when you rotate back and forth from landscape to portrait. It will work correctly several times but will randomly change the container and clip…
7
votes
1 answer

Auto Layout and sizeForChildContentContainer

I have a content container view controller that adds a child view controller and then sets up some Auto Layout constraints to size the child view. The child view does not entirely fill the container's view. My child view controller implements…
Mark_Ss
  • 111
  • 5
6
votes
1 answer

Refresh Single View Controller in Container View

I need help refreshing a single view controller in a container view by passing a variable value to it. I have a storyboard which contains a view controller with a container view. See the following image: Total Sales by Company Users is changing by…
Sagar Chauhan
  • 5,715
  • 2
  • 22
  • 56
6
votes
0 answers

preferredFocusEnvironments is not called

preferredFocusEnvironments is not being called for view controllers embedded into a container view Is there any additional thing to do for these cases?
Aymen HARRATH
  • 474
  • 3
  • 15
6
votes
3 answers

UIPageViewController with Scroll Transition Style automatically adds Safe Area insets for iPhone X

I'm developing image gallery like slider using UIPageViewController and I'm having troubles with UIPageViewController automatic insets in Scroll transition style mode. Here is my layout: UIViewController with UIContainerView (magenta…
6
votes
1 answer

Embedding a Collection View inside a Container View - extra white-space at top

I have an app that uses a Nav Contoller as it's initial VC, which then has a root UIViewContoller that contains a UIView at the top half, and a UIContainerView at the bottom. In the UIContanerView, I'm embedding a working UICollectionView that…
Dan Coughlin
  • 1,104
  • 10
  • 14
6
votes
3 answers

How to remove UITableView top inset when embedded in ContainerView?

I am currently working on an iPhone App. I now have a problem with the top spacing inset of a UITableView. See this screenshot: There should be no space between the table view cells and the buttons. I do not know how to fix this. The UITableView is…
funkenstrahlen
  • 3,032
  • 2
  • 28
  • 40
6
votes
5 answers

Resizable container views containing view controllers

I want to be able have several UIViewControllers on the screen at once, arranged as panes, as per the diagram below. With the ability to: add additional panes while the program is running. drag the bars between the panes to resize them I was…
cannyboy
  • 24,180
  • 40
  • 146
  • 252
5
votes
0 answers

Ensure presentingViewController for a popover is the original presenter

I have a container view controller. One of the child view controllers needs to present a popover. The problem is that the popover's presentingViewController ends up being the container view controller and not the child view controller that presented…
rmaddy
  • 314,917
  • 42
  • 532
  • 579
5
votes
1 answer

setViewControllers doesn't work

I'm trying to change the current ViewController of my UIPageViewController using a NEXT button. So I'm calling the function that's in my containterViewController in my mainViewController using a delegate. But it doesn't execute the…
Lennart P.
  • 316
  • 1
  • 6
  • 20
5
votes
1 answer

Passing Data to view controllers that are embedded in container views

I have view controllers that just need to get passed a NSDictionary called "otherUser". I am using a segmented controller to conveniently present 4 of these views to a user using container views. I know all of these views will be loaded at the same…
Lukas Bimba
  • 817
  • 14
  • 35
5
votes
1 answer

SubView transition resizing after transition

I have a container view controller and child view controllers (Similar to UITabViewController). When transitioning between the view of one child view controller and another child view controller's view, I am using: let oldView = // get reference to…
plawres
  • 313
  • 4
  • 19
5
votes
2 answers

ContainerView with shadow and rounded edges

I would like to create custom ContainerView with shadowed and rounded edges. This ContainerView is in form of small rectangle placed on the top of another UIView. In this peculiar situation neither additional layers nor drawing shadow using…
5
votes
2 answers

xcode 7 swift how to make container view transparent

I have 5 tabs in my application. I need to add a floating button for quick action on all my tabs. I've managed to add the floating button at the bottom, just above the tab bar using a container view. So the container is positioned at bottom right…
Stacy J
  • 2,721
  • 15
  • 58
  • 92
1 2
3
43 44