Questions tagged [childviewcontroller]

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)

242 questions
0
votes
3 answers

How to transfer data between Parent and Child View Controllers

I have tried looking at answers on similar questions to this, but I am not particularly experienced and have had trouble following them, so any help would be much appreciated! My situation is as follows: when I press a button in my Parent…
0
votes
1 answer

View not displaying for childViewController of another ChildViewController

I'm having an issue with a multi-level hierarchy of childViewControllers in iOS/Swift. There are three layers to the current setup from lowest-to-highest: InfoViewController SelectionViewController MainViewController The InfoViewController has a…
0
votes
0 answers

Back from presentViewController distorts the screen - ios objective c

I'll give an overview of what I am trying to achieve: 1) There is screen1 on which there is a header on navigation bar. 2) On a button click, I am adding screen2 (it doesn't have a nav bar) as a child view controller on the first screen Code for…
0
votes
1 answer

How to prevent multiple child viewControllers from loading at once?

I have a Container viewController with 3 Child viewControllers. When the app first launches all 3 Child viewControllers gets loaded instead of me first swiping to the View controller. This is causing me issues when my analytics tool tracks what…
user7097242
  • 1,034
  • 3
  • 16
  • 31
0
votes
0 answers

UIButtons in ChildView controllers not firing

so i have added three child view controllers to a pageViewController which all scroll fine and I can see the 3 child view controllers fine in the simulator but for some reason none of the buttons in my child view controllers work. Here is the code…
0
votes
1 answer

iOS - How to avoid putting the Navigation Control in the Navigation Bar Items when working with Container View

I am currently working on a new feature which is presented like this : The whole content is a Container View, in order to change the content by playing with the Segmented Control. I have 2 other UIViewController (for the first and second…
user7219266
0
votes
1 answer

Switch ViewControllers of different heights in Container View

I have a requirement where I have to load different UI based on selected option in a ViewController. Here is the representation Option1 and Option2 are radio buttons and user is allowed to select only one option at a time. Based on the selection,…
iOS
  • 3,526
  • 3
  • 37
  • 82
0
votes
2 answers

Moving to root view controller without showing child views

I want to dismiss all child views and finally move to root view controller. I used the following code DispatchQueue.main.async { appDelegate.window?.rootViewController?.dismiss(animated: false, completion:nil) } But issue is that while…
0
votes
0 answers

Swift iOS -back button bug making scene show itself repeatedly before showing previous view

I have a navigation controller with 4 child views: vc1, vc2, vc3, and vc4. I have them all connected to one another using storyboards and not programmatically. I have a button in each scene that has the segue connected to it that pushes on the…
Lance Samaria
  • 17,576
  • 18
  • 108
  • 256
0
votes
1 answer

loading childViewControllers first time logging in

I have been struggling with an issue for loading child ViewControllers. The first time I log in it shows the containerView but without the childViewControllers loaded. When I close the app and re-open the app with the logged in state saved the…
0
votes
2 answers

dimiss modal and return to presented childViewController in containerView

I am having a bit of an issue with dismissing a modal view presented from a childviewController in a container view. I have a UINavigationController as the rootViewController (MainNavigationController), and present a modal from one of the…
0
votes
1 answer

iOS - How to set imageview of a parent view controller through child container?

I am currently using a container view and I want to change the value of parent view controller imageView through child view controller using delegates, but it always returns nil. import UIKit protocol updateImage { func…
0
votes
2 answers

Adding a second child view controller using NSLayoutContraints, always position it under the Navigation bar, not after the Navigationbar

am facing a strange problem with the UI. Please find below details. I created a sample demo project to showcase the issue. The requirement is pretty simple (Attached screen shots too). The app starts with a ViewController which is a…
0
votes
1 answer

How do I manage recurrent child UIViewControllers?

Scenario: I instantiate a UIViewController and added it to a containerViewController. I dismiss (remove) this child I select this same child to display again. My Concern: I wish to create a single child UIViewController instance. But It…
Frederick C. Lee
  • 9,019
  • 17
  • 64
  • 105
0
votes
1 answer

How to share UIView between transitioning UIViewController's (with addChildUsingController:)

Let's say that on the tap of a UIButton in ViewControllerA the following happens before transitioning to ViewControllerB: - (IBAction)levelSelectButton:(id)sender { ViewControllerB* obj = [[ViewControllerB alloc] init]; [self…