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
3
votes
1 answer

Strange navigation bar animation when transitioning to a child UINavigationController

I have created a small project to replicate this problem. The only file is this one... Brief bit of code class RootViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .red …
Fogmeister
  • 76,236
  • 42
  • 207
  • 306
3
votes
2 answers

childViewController.view.frame in UIView present different value

I use childViewController to separate view in project, but some strange issue happened, here is my code. class ViewController: UIViewController { var container = UIView() var childVC = ChildViewController() override func viewDidLoad()…
huangxinyu
  • 247
  • 3
  • 11
3
votes
2 answers

Presenting child view controller inside UIPageController's current page

I have a page view controller that transitions between view controllers using the normal UIPageViewController methods. Inside one of the presented view controllers (let's say the current view controller), I add a child view controller into a subview…
Jeremy Kelleher
  • 287
  • 3
  • 13
3
votes
2 answers

View as SubView VS ChildViewController

Can any one explain when should we add a UIViewController as ChildViewController? What is the benefits of adding it as ChildViewController instead of subView? Please help me to understand the purpose of ChildViewController.
3
votes
1 answer

How do I present a view controller from UISearchViewController embedded in a child view controller of a parent view controller?

I have a parent view controller called MainViewController, and a child view controller called FilterViewController that takes partial of the main controller screen. Inside the filterViewController I added a UISearchController to the tableview. But…
miracle-doh
  • 596
  • 1
  • 4
  • 19
3
votes
0 answers

iOS topLayoutGuide using a child view controller difference between iOS 7 and iOS 8

Basically I'm trying to resolve the same problem as this question is asking. However, when I am running the app on iOS 8, everything is working as expected: the child view controller is using its own topLayoutGuide but its position values are set…
Petar
  • 2,241
  • 1
  • 24
  • 38
3
votes
2 answers

UITableViewController as ChildViewController not calling delegate methods

I have a UITableViewController , when I use it as 'initial view controller' ,it works perfect. Now, I am using it as a 'child view controller ' of another View controller, but now when I try to select a row , 'didSelectRow' method is not called…
3
votes
2 answers

transitionFromViewController:toViewController error: children view controllers must have a common parent view controller

I'm trying to transition from my current view controller self to self.aVC using view controller containment using self.navigationController as the container. When I run the following code, the "children view controllers must have a common parent…
3
votes
3 answers

Need advice regarding multiple child view controllers

All, I am running into some performance/memory issues when using several ChildViewControllers in my ParentViewController. Here is my situation: I have a ParentViewController with a dynamic number of ChildViewControllers - some times as many as 20.…
coder
  • 10,460
  • 17
  • 72
  • 125
3
votes
2 answers

UIScrollView Subview Container Incorrectly Changing Frames

I'm having a problem with ChildViewController views having their frames automatically changed to their parents' frames. I've distilled it to an example project with a single class to illustrate whats happening. In a nutshell, I: have a…
3
votes
2 answers

Is Interaction Between Presented/Presenting View Controllers and Parent/Child View Controllers Documented Anywhere?

Reading the documentation on the changes to UIViewControllers in iOS, I trying to figure out how the interaction between presenting modal view controllers works inside of a custom container view controller. Ultimately, what I would like to be able…
2
votes
1 answer

iOS : Why do we need to add child view controller when adding view as subview does the work?

There is a ViewController1 which has a stackView. I created an instance of ViewController2 and added it's view as a subview to the stackView of ViewController1, I wanted to see if only by doing this does viewDidLoad of ViewController2 is invoked…
Youraj
  • 747
  • 6
  • 8
2
votes
2 answers

Unbalanced calls to begin/end appearance transitions when try to present viewcontroller

I'm getting Unbalanced calls to begin/end appearance transitions error when i try to present view controller which is previously added as child controller, how to resolve this? Unbalanced calls to begin/end appearance transitions class…
SPatel
  • 4,768
  • 4
  • 32
  • 51
2
votes
1 answer

Interactive transition between two child view controllers

I'm implementing a custom UIPageViewController so that I can use custom animations between view controllers. I can transition from one view controller to the other with the transition(from:to:duration:options:animations:completion:) method. However…
Morpheus
  • 1,189
  • 2
  • 11
  • 33
2
votes
0 answers

Add a child view controller with push animation?

So this is the hierarchy: BaseViewController: UIViewController ... ParentViewController: BaseViewController (Embed In: UINavigationController). ...... ChildViewController1: UIViewController ...... ChildViewController2: UIViewController ......…
Hemang
  • 26,840
  • 19
  • 119
  • 186
1 2
3
16 17