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
13
votes
6 answers

Perform a parent segue from the embedded view controller

I have this: MyTableViewController (inherits from UITableViewController) It has a dynamic tableview with a few cells (foo, bar, qux) MyViewController (inherits from UIViewController) There are some "show" segues from this controller to other…
sports
  • 7,851
  • 14
  • 72
  • 129
13
votes
2 answers

How to display an container view with animation in iOS?

I want to display my own custom view when an user taps an button in the original view controller, and so I tried to define the following function which is caused when the user taps the button: func show() { vc = UIViewController() var button…
Blaszard
  • 30,954
  • 51
  • 153
  • 233
13
votes
3 answers

UIView vs Container View

So here is the problem I am trying to solve. In each viewController I am trying to insert ads and the actual control elements. I finished couple of tutorial on raywenderlinch.com to understand that how people professionally put ads in their app.…
Alok C
  • 2,787
  • 3
  • 25
  • 44
12
votes
2 answers

How to set height of containers in stack view?

I'd like to ask you if it's possible to set height in percentage of each container placed in vertical stack view? I want to have 3 containers in stack view. First should take 40% of screen size, second 20% and third 40%. Thank you
Lachtan
  • 4,803
  • 6
  • 28
  • 34
12
votes
1 answer

Can I create a UIContainerView programmatically?

I'm trying to create a dynamic view flow that uses UIContainerViews to host UIViewControllers. The UIContainerViews (or UIViewControllers) need to be programmatically added to the UIView to allow multiple side by side. I've been looking around, but…
Chackle
  • 2,249
  • 18
  • 34
12
votes
2 answers

Hide a view container with a button in the ViewContainer

I have a View. In this view, I have a Container View. And in the ContainerView I have a button. When I am touching the button of the ContainerView, I want the ContainerView become hidden. I want to do something like that : class ContainerView:…
PMIW
  • 757
  • 2
  • 7
  • 15
11
votes
2 answers

Delegate using Container View in Swift

I'm developing an app for iPad Pro. In this app, containerView use to add additional views and interact with them. First, I created a protocol: protocol DataViewDelegate { func setTouch(touch: Bool) } Then, I created my first view…
James
  • 1,167
  • 1
  • 13
  • 37
11
votes
3 answers

UINavigationController embedded in a container view, displays a Table View Controller with wrong size

I'm trying to find a workaround to this situation: I have a UITabBarController one of its segue is connected to a container view controller (BannerViewController) that I'm using to embed a UINavigationController, the navigation controller pushes…
Andrea
  • 26,120
  • 10
  • 85
  • 131
10
votes
4 answers

IQKeyboardManager not working when UITableView embedded in a container view

Currently, I am working with a container view with an embedded UITableView and am using the IQKeyboardManager CocoaPod to scroll the view so my UITextFields and UITextViews are not covered by the keyboard. I can successfully import IQkeyboardManager…
10
votes
1 answer

How to Make Touch Events Affect View's Behind a Container View?

I have a container view completely covering another UIView. The container view has transparency along with a few other things (search bar, table view, etc). I want touch events to go through the container view and affect the view underneath when the…
i2Fluffy
  • 333
  • 2
  • 12
9
votes
6 answers

How can I switch between two child View Controllers on Swift?

I am trying to switch between two child View Controllers on a particular Container View. I have a Navigation Controller with a menu (Table View to make the different options of the menu). Each time I click an option of the menu I would like to…
9
votes
1 answer

Adding a container view to UICollectionViewCell

I am trying to add a container view to a UICollectionViewCell in interface builder but Xcode issues an error error: Illegal Configuration: Container Views cannot be placed in elements that are repeated at runtime. Will making the…
MobileDev
  • 3,750
  • 4
  • 32
  • 35
9
votes
3 answers

Why content insets of a UITableView inside a UIPageViewController get messy right after an interaction?

I've created a Page-Based Application and hacked it a bit for some experiments; my simple aim is to have a UIPageViewController whose pages will contain a UIViewController holding a UITableView (after further inspection, the outcome of my experiment…
dev_mush
  • 2,136
  • 3
  • 22
  • 38
8
votes
3 answers

From a containerView, how do you access the view controller containing the container in Swift?

I do have 4 Views with a Headerpart which I outsourced into a containerview to have the same fields and layout on all 4 views. Inside my container im having a lot of labels which i know wanna fill with data. My problem now is, that i have to fill…
XaNNy0
  • 169
  • 1
  • 8
8
votes
2 answers

ContainerView add outlet

I have a ViewController with a Container View that has an embedded TableViewController. Now i would like to access the TableView in the ViewController, how can i make an outlet for that? I tried to add the Container View as an outlet, but i can't…
Lord Vermillion
  • 5,264
  • 20
  • 69
  • 109
1
2
3
43 44