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
1
vote
2 answers

Calling child view controller using segmented control action?

I have two child view controllers in my parent view controller, I want to call them upon a value change in the segmented control, and want to set the value of the parent imageView through child view controllers. protocol UserEdittedPhoto { func…
1
vote
0 answers

Cant' dismiss a UISearchContainerViewController on tvos

So I'm working on a full screen tvos video application. No Tab bar, No Navigation Bar. I've been trying to add Search functionality to this app. I'm using a gesture during development to display the search feature. I instantiate the results…
morgman
  • 567
  • 5
  • 14
1
vote
1 answer

UINavigationController as subview to MSMessagesAppViewController

I'm creating an iMessage extension where for the expanded presentation style I want to use a UINavigationController. I'm trying to add the navigation controller as a subview of the MSMessagesAppViewController using the function below: private func…
1
vote
2 answers

Container view controller app crash NSInternalInconsistencyException in Swift?

I have a UIViewcontroller with a container view inside. In the storyboard, the container view is connected with the UIViewcontroller through an Embed Segue. I do not need to pass data from the ParentView Controller to the Child View Controller. The…
Charlotte1993
  • 589
  • 4
  • 27
1
vote
2 answers

Adding a ChildViewController causes strange behavior to the child viewcontroller

By "strange", I am noticing the following behavior: background color set by the ChildViewController does not appear despite adding a basic tap gesture recognizer to the ChildViewController, there is no tap recognition adding a UIButton to the…
daspianist
  • 5,336
  • 8
  • 50
  • 94
1
vote
1 answer

Swift: Make child view controller stay in place even WITH segues to new controller?

Im having a problem here. Basically within my app I have 4 elements (these 3 bottoms view "buttons" and a top bar-like view) that need to stay in front of EVERYTHING (as in the uppermost index) at ALL TIMES. I have a series of segues set up that…
blue
  • 7,175
  • 16
  • 81
  • 179
1
vote
2 answers

How to get height of UITableView placed in another UITableView in Cell as childViewController

I'm struggling with wired kind of problem. I have UITableView with one cell. This cell is only holding containerView with childViewController (second tableView). My problem is that, first tableView(parent) must have UITableViewAutomaticDimension row…
1
vote
1 answer

iOS Check ViewController has ChildViewController?

I want to do something when viewController has any ChildViewController. I'm using below code to add child viewController : ParentVC *parentVC = [self.storyboard instantiateViewControllerWithIdentifier:@"IDParentVC"]; ChildVC *childVC =…
Ekta Padaliya
  • 5,743
  • 3
  • 39
  • 51
1
vote
3 answers

Swift: How to segue between view controllers and use navigation bar to go backwards within a child view controller (XLPagerTabStrip)

I am currently implementing the XLPagerTabStrip (https://github.com/xmartlabs/XLPagerTabStrip) which effectively creates a tab bar at the top of the view controller. I want to be able to segue to a new view controller from one of the tabbed…
1
vote
2 answers

How to get the parentViewController in childViewController?

I have a main UIViewController and named AddInformationController. In this mainViewController I have two UIContainerView. Each of them embed with a UITableViewController. The table view controllers are named InformationSegmentController and…
1
vote
3 answers

Child View Controller loses delegate after Presenting and Dismissing Modal View

I am adding a Child View Controller using this code: MyCustomViewController * overlayView = [[MyCustomViewController alloc] initWithNibName:@"MyCustom" bundle:nil]; UIViewController *parentViewController = self.tabBarController; [modalView…
Chris
  • 5,485
  • 15
  • 68
  • 130
1
vote
0 answers

Passing data and delegation

I have got a question about delegation. I am fairly new to programming and I have just managed my first exercise-project in which I use delegation. All it is, is a Parent View Controller that calls a Child View Controller which has a text field and…
Paul
  • 1,277
  • 5
  • 28
  • 56
1
vote
1 answer

Understanding delegation

I am trying to understand delegation. I have written a small project to try to tackle this. I have also had help from S.O. I am stuck on the very last part of it. My project is simple. We have a main view controller that has a button "start". This…
Paul
  • 1,277
  • 5
  • 28
  • 56
1
vote
2 answers

Remove Childview controller from parent viewController in ios

I have a Parent viewController named "CenterViewConroller" and Child viewController named "InventoryViewController". I have a UIButton in CenterViewController, when i click the Button childView should appear at given dimension and when i again click…
Rupinder
  • 156
  • 1
  • 12
1
vote
1 answer

viewWithTag always returns nil in child view controller

I was using [self.view viewWithTag] in order to reference objects within a UIViewController. I then proceeded to move a specific subview to a new UIViewController, then adding it as a child view controller and adding the view as a subview. However,…
Charles
  • 4,372
  • 9
  • 41
  • 80