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
7
votes
3 answers
How to detect touch event in child viewcontroller in ios
I have created a sideview like menu for the iPhone for which I have used container ship concept for adding child view controller in the parent view controller. When user taps on menu button on the navigation bar I just change the frame of child view…

Dhaval H. Nena
- 3,992
- 1
- 37
- 50
7
votes
3 answers
Child view controller in UICollectionViewCell
Suppose I want to achieve Pinterest's pin page, like this one:
This is my approach:
make a UICollectionViewController, pin's page is a UICollectionViewCell
cell is make of two components: pin info child vc && waterfall child vc
Then comes the…

limboy
- 3,879
- 7
- 37
- 53
7
votes
3 answers
iOS - childViewController not receiving events
Newest Update: I created a brand new project that is built the exact same way as below. However, this test project actually works just fine even though it seems to be the same... One thing I've noticed is that the parent view controller in the…

Sethypie
- 549
- 6
- 21
6
votes
0 answers
Add child view controller to UITabBarController issue
I'm trying to add an UIViewController as child view controller to the tab bar controller. See code below:
guard let vc = self.storyboard?.instantiateViewController(withIdentifier: "MyAlertViewController") as? MyAlertViewController else
{
…

iOS Dev
- 4,143
- 5
- 30
- 58
6
votes
2 answers
Cannot reorder Collection View cells
I have a Split View Controller and when the user clicks a cell in the Table View, the app shows a View Controller with a Container View and a Segment Control to switch between two children view controllers.
The first child view controller is a…

alessionossa
- 923
- 2
- 15
- 41
6
votes
1 answer
Multi-layered child viewcontrollers where delegation is becoming a nightmare - how should they communicate with each other?
This is a serious problem for me right now. Working on a code base with multi-layered children viewcontrollers about 4-5 layers deep - this is a tablet app with a very high degree of decoupling between viewcontrollers. The 5th layer child…

Rickster
- 1,393
- 3
- 13
- 19
6
votes
1 answer
Issue with AutoLayout and ChildViewControllers (incorrect size of ChildVCs' view)
I'm experiencing some difficulties doing a rather simple thing, I'm missing something but don't see...
I reproduced the issue with a very simple App (using IB) :
App's main ViewController is a UINavigationController.
NavigationController's root is…

djioul
- 138
- 1
- 4
6
votes
1 answer
Set frame of a navigation controller added as a child view controller
I am trying to add a UINavigationController as a child view controller and then give it a smaller frame than its parent. However, changing the navigation controller's frame does not properly change the frame of the navigation controller's root view…

Bryan Irace
- 1,855
- 2
- 20
- 38
5
votes
1 answer
Swift: How to show child view controllers via storyboard rather than programmatically using XLPagerTabStrip
I have been following the XLpagerTabStrip cocoapods extension to set up a tab bar at the top of my view controller (https://github.com/xmartlabs/XLPagerTabStrip). I am implementing the ButtonBarPagerTabStripViewController and have followed the steps…

Ryan Hampton
- 319
- 1
- 4
- 21
5
votes
6 answers
How to disable navigation bar in iOS
I would like to disable the navigation bar while adding a child view and enable it again once I remove the child view. How to do that. A similar action when an action sheet is shown.

Arock
- 397
- 5
- 17
4
votes
0 answers
iOS 11 UINavigationBar Position Loses Status Bar Height During Transition
This bug has cropped up in iOS 11. There is a UINavigationController embedded as a child UIViewController of another UIViewController. There's a UIPanGestureRecogniser setup that affects the y axis of the child UIViewController's view's frame…

Mark Bridges
- 8,228
- 4
- 50
- 65
4
votes
0 answers
Unable to scroll vertically UIScrollView/UITableView of ChildViewController if scrolling of UIScrollView of parent class is disabled forcefully
AIM: To achieve the scroll of parent upto a particular point. Freeze its scroll and let the child view scroll till the bottom. Again move up, let child view controller scroll, till it reaches its top then let the parent view scroll till it reaches…

tech savvy
- 1,417
- 4
- 21
- 42
4
votes
1 answer
ChildViewController view entering and then disappears
I have a view controller in which there is a button and a window.
By pressing the button, the view in the window should change.
The view in the window is another ViewController and its view.
When pressing on the button, all the methods of…

Lena Bru
- 13,521
- 11
- 61
- 126
4
votes
4 answers
Show Navigation Bar in Child View Controller
I am working on an app in which I have to display multiple view controllers side by side (split views). For this purpose I have added views as child view controller.
OBJECTIVE: I want to show navigation bar on one child view controller along with…

Salman Zaidi
- 9,342
- 12
- 44
- 61
4
votes
1 answer
iOS: Child View Controller and Auto Layout
I have a very simple scenario that is not working for me. I have one storyboard with two view controllers:
ViewController1
- ViewA
- ViewB
ViewController2
- ViewC
My ViewController1 is working as intended and when I rotate the device the views…

Rafael
- 1,655
- 3
- 17
- 25