childViewController is Apple's iOS Custom Container View Controller management style. Specifically the -addChildViewController: method facilitates Apple's iOS in order to combine multiple view controllers in a custom hierarchy (similar in concept to the UISplitViewController class)
Questions tagged [childviewcontroller]
242 questions
0
votes
1 answer
Child View Controller and Margin
I have a child view controller as below.
import UIKit
class SampleChildViewController : UIViewController {
let imageView : UIImageView = {
let imageview = UIImageView()
imageview.translatesAutoresizingMaskIntoConstraints =…

Reshan Kumarasingam
- 423
- 7
- 21
0
votes
2 answers
Call function of child view instance from parent view controller
I have a motherView controlled by motherViewController with a container view in it. The container view is controlled by an childViewController. The childView holds an tableView.
Now I have a cleanTableView function in the childViewController, which…

Womble Tristes
- 393
- 1
- 4
- 14
0
votes
0 answers
UIView Animation is not working when adding ChildViewController
I have a MasterViewController and I am adding a ChildViewController inside a MasterViewController. Inside MasterViewController I have made top button bar , and took a view as a Container view. In this container view I want to move my…

Android teem
- 780
- 2
- 13
- 36
0
votes
1 answer
How to put barButtonItems from child controller to navItem?
Mine screen contain UITabBar (tabs) and childViewController (content).
When I switch to another tab, I replace current child with next code:
private func replaceChild(_ old: UIViewController?, with new: UIViewController, in container: UIView) {
…

Viktor
- 1,020
- 1
- 9
- 22
0
votes
1 answer
Swift iOS -Adding ChildViewController to CollectionView Section using SegmentedControl
I have a view controller that contains a collectionView with 2 sections. The header of the second section is a sticky header and it has a segmentedControl inside of it:
ParentViewController
--collectionView
--sectionOne // because there…

Lance Samaria
- 17,576
- 18
- 108
- 256
0
votes
0 answers
Swift - how to reference subview from AppDelegate
My root ViewController is called MainViewController.
It has a subview called ToolsViewController.
I want to reference the subview (ToolsViewController) from my AppDelegate.
I can reference the root view, however, I cannot seem to get to the…

squarehippo10
- 1,855
- 1
- 15
- 45
0
votes
1 answer
Why can't I assign data from the root view onto its embedded container view?
I have a DetailViewController that has a container view. The first container view that will appear is the DetailChildViewController.
The DetailChildViewController consists of a collection view which will display the child view's properties. However,…

Julienne Lim
- 9
- 2
0
votes
1 answer
how can I instantiate a viewController with a containerView and it's containerView at the same time?
I want to instantiate a viewController with a container with the following:
let vc = self.storyboard?.instantiateViewController(withIdentifier: ContainerViewController") as? ContainerViewController
I also need a reference to the containerView so I…

alionthego
- 8,508
- 9
- 52
- 125
0
votes
2 answers
Sending Data to child view controller from parent view controller
I am trying to send data from parent view controller to child view controller, whenever I override the performSegue method, the data loads to the popup view as shown below:
But what I want is show data in something like picture shown below:
I…

TheSwiftGuy77
- 656
- 1
- 9
- 25
0
votes
1 answer
How to avoid memory leaks with child viewControllers
imagine a ViewController which is comprised of multiple child ViewControllers as depicted below:
ViewController1:
- ViewController2
- ViewController3
ViewController2 does not change so it is defined on the Storyboard with containerViews. In order…

Bruno Morgado
- 507
- 1
- 8
- 26
0
votes
1 answer
Dim superviewcontroller but not child view controller
Is it possible to dim the super viewController but not any of its childViewControllers. For example, dim my map view but not the tableviewController that is its childViewController.
PopoverViewControllers wont work because I'm on iPhone only. What…

NojDavid
- 89
- 1
- 10
0
votes
3 answers
Add ChildViewController and perform button action in ChildViewController
I am adding child view controller to main view, child view controller contains two buttons that have their action methods defined in child view controller class. On the action of those buttons need to dismiss the child view controller. Is there any…

iPhone Programmatically
- 1,211
- 2
- 22
- 54
0
votes
1 answer
Add custom cell in childViewController
I have a childViewController on a UICollectionViewController. I have so my childViewController appears on the screen. But when I register a cell collectionView?.register(MyCustomCell.self, forCellWithReuseIdentifier: CellId) and use…

Stc
- 25
- 7
0
votes
1 answer
Send data back to parentviewController from childViewController
Added a child view controller as below:
// ParentViewController
if ((self.delegate?.showPopupSymtomDetailViewController(view: viewController, receiver: self)) != nil)
{
}
// ChildViewController
//MARK: PopUpCode
func…

iPhone 7
- 1,731
- 1
- 27
- 63
0
votes
1 answer
Swift 3 - addChildViewController on UIWindow of another view controller
I have to add second view controller's view on UIWindow of the first view controller using addChildViewController. but I'm getting issue when I'm trying to do that. My query is, it is possible to add that another view controller's view on UIWindow?
…

ssowri1
- 1,299
- 2
- 14
- 31