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
1
vote
2 answers
How to push VC from child VC?
I have three UIViewControllers. First one is MainViewController. MainViewController has TabView and, under TabView, childView (UIView). Depending on picked tab, childViewController is opened (on childView). childViewController has TableView. I want…

llama_glama
- 37
- 7
1
vote
1 answer
Cant access uitextfield in childviewcontroller
Childview
@interface GenWarnDangerVC : UIViewController
@property (weak, nonatomic) IBOutlet UITextView *riddorText;
In the parent I want to access the UITextView but can't quite getv the syntax
NSString* tempString =…

JulianB
- 1,686
- 1
- 19
- 31
1
vote
0 answers
addChild not working when children vc not in same storyboard as parent vc
I'm learning and trying a lot at the moment and so I tried to do a custom tab bar instead of using the UITabBar. For that I used this tutorial https://guides.codepath.com/ios/Creating-a-Custom-Tab-Bar and everything is working well when my child…

TGDev
- 33
- 4
1
vote
0 answers
How to properly manage memory while using child view controllers in UICollectionView cells?
I have UIViewController(HomeController) with horizontally scrollable UICollectionView in it. This collection view contains 2 cells (the number is not dynamic, there will be always only 2 cells). The cell covers all the screen. In each cell I have a…

Alex D
- 43
- 1
- 1
- 7
1
vote
0 answers
didReceiveMemoryWarning removes cells/views from UITableView hierarchy
I have set up a UITableView in which each cell has a child UIViewController
I've tried reusing cells using dequeueReusableCell(with identifier:) and adding/removing child view controller on willDisplay cell and didEndDisplaying cell methods.
Another…

Casper
- 152
- 12
1
vote
1 answer
UIAlertController not anchored on childViewController but rather displaying behind it on parentViewController
I have created a left menu drawer and added it as a child view controller. In the left menu drawer I have a logout button that should display a UIAlertController. The challenge I am experiencing is that the UIAlertController is displaying behind the…

RonoKim
- 184
- 1
- 16
1
vote
1 answer
Child View Controller Size Issue
I have a view controller with a segmented control in the navigation bar that switches the child view controller pithing the parent controller. It works fine but the table view I have as a child vc is not the correct size. It gets cut off at the…

raginggoat
- 3,570
- 10
- 48
- 108
1
vote
2 answers
Adding a child view controller to a subview but make it modal to entire view without a navigation controller
Using Xcode 10+, Swift 4, iOS 11.4+
First let me say that I'm not using a Navigation Controller -
I'm adding a ViewController to another as a child using this basic…

wayneh
- 4,393
- 9
- 35
- 70
1
vote
1 answer
Peculiar top margin in the ImageView added from ChildViewController
I have created a child view controller as below. It has a UIImageView. I added the UIImageView to the view as below.
class SampleChildViewController : UIViewController {
let imageView : UIImageView = {
let imageview = UIImageView()
…

Reshan Kumarasingam
- 423
- 7
- 21
1
vote
1 answer
Child View frame change when pushed again from parent view controller
I have added a viewcontroller's view as a child view in an another viewcontroller. The child view controller has a tableview. Child view controller can be pushed more than once while click on didSelectRow to show updated data in same viewcontroller…

Aman Pratap
- 25
- 6
1
vote
0 answers
Custom segue won't resize Subview
I am using a custom segue for transitioning from a collection view cell to a view controller with a kind of zoom in/zoom out style - pretty much like App's do it on the Homescreen, when you open/close them.
In the destination view controller I am…

ChrisTheGreat
- 512
- 4
- 21
1
vote
1 answer
App crashes when removing child view controller from its parent
I'm trying to test some animations between UIViewControllers and in this particular case I have a UIViewController that adds another UIVC as its child view.
Everything works as expected, the child view gets added and presented, then on the child…

Ivan Cantarino
- 3,058
- 4
- 34
- 73
1
vote
2 answers
How to remove a VC then add another VC directly afterward
I have a Main VC (call this VC A), that has a child VC (VC B). When I tap a button on VC B I dismiss it as a child VC, however once this is done I would like to instantiate another VC (VC C). I do this by creating a bool on VC B which, if true calls…

NightHawk95
- 163
- 3
- 11
1
vote
0 answers
Chilld view Controller donot resize on rotation when added programatically
i've a rootview contoller in which i've added a splitview controller from storyboard and dynamically i'm adding another SecondView controller as a child to rootview controller.Issue i'm facing is on orientation Second View controller removed from…

Nitisha Sharma
- 239
- 4
- 14
1
vote
1 answer
Swift - Can't Pass Data through Custom Tab Pager in Nav Controller
I followed a tutorial on how to implement a custom tab pager in a navigation controller. My setup looks like this. On the BuyStatsTapPager (on the right) you should see that you can switch between "buy" and "contest".
This basically works by…

Louis Sankey
- 481
- 8
- 26