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
0 answers

bar button created from childViewController don't work

I have parentViewContoller(with UINavigationItem), and childViewContoller(with UITableViewContoller, UISearchBar). I want create UIBarButtonItem on click that searchBar hiding. TableViewContoller.h(childViewContoller) @interface TableViewController…
1
vote
2 answers

iOS: Autolayout with child view controllers

I've been using autolayout for a couple of weeks now. Currently, I'm using a 3rd party library called FLKAutoLayout which makes the process easier. I'm at the point where I can construct views the way I want, usually without problem. However, over…
1
vote
0 answers

ChildViewController = 0 then crash after popToRootViewController

I'm encountering the strange crash with combination of popToRootViewController and NavigationControllerDelegate. There are 3 tableViewControllers created in Storyboard. RootViewController - secondViewController - ThirdViewController Then I…
1
vote
0 answers

Weird behavior of child view controller's view frame on iphone5

What I'm trying to do is create a view controller, and have its view animate in from the right. The main view controller has a view called viewContainer that will house this view. The weird thing is that this works works perfectly in the simulator…
soleil
  • 12,133
  • 33
  • 112
  • 183
1
vote
0 answers

ViewDidLoad not getting invoked in child viewcontroller while using PSTCollectionViewController

I am using PSTCollectionView as an alternative to UICollectionView to have compatibility with iOS5 (as well as iOS6). I am using storyboard to create my root viewcontroller then I add PSTCollecitonViewController programatically. Here is the…
1
vote
1 answer

How to structure the presentation of a square overlay like the Music app on iPad?

I need to create an interface that's basically the same as how the iPad Music app displays track lists in the albums tab - a square in the center of the view containing a view controller's view, with the playback controls still accessible at the…
Marky
  • 1,294
  • 1
  • 18
  • 40
1
vote
1 answer

When and how to nullify a child UIViewController

I am adding a child view controller to my primary view controller using the following code: HPSPhotoLibraryOverlayController* controller = [[HPSPhotoLibraryOverlayController alloc] init]; [self.view addSubview:controller.view]; [self…
Journeyman
  • 10,011
  • 16
  • 81
  • 129
1
vote
2 answers

iOS Access parentViewController to change the State of a UIButton setSelected:YES

I have a UIButton in MainViewController. MainViewController has a childViewContoller. I need to access the UIButton (tcButton) property in MainViewController FROM the childViewController and set it to setSelected:YES in viewDidLoad. I have the…
user1107173
  • 10,334
  • 16
  • 72
  • 117
0
votes
1 answer

Swift calling ChildVC sometimes causes fatal error

I have been trying to debug this for several days now but I can't seem to understand how it happens. I might be missing some information on how child view controllers are called. I have a map that opens a child view controller on longpress. This…
Jan L
  • 233
  • 1
  • 10
0
votes
0 answers

How can i update the appearance for NavigationBar and TabBar when using UISearchController?

In my UIKit-App, i am using a UITabBarController with two viewControllers: HomeViewController and SearchViewController. Every viewController is embedded inside a UINavigationController. Inside my SearchViewController i setup a UISearchController…
0
votes
1 answer

Swift: How to display multipe views and keeping all of them active

I am building an App which has a map in the background and a draggable view infront of it, whenever a place is selected. Currently I am presenting my view with a custom PresentationViewController which makes sure that the animation is correct and…
Jan L
  • 233
  • 1
  • 10
0
votes
1 answer

Working with 2 UINavigationControllers inside a ViewController as Child causes only 1 to respond, the other does not respond

I'm working with a project where I start with a ContainerViewController having 2 controllers added as a child: func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let…
0
votes
1 answer

scrolling not working inside childview - swift(iOS)

I have added child view inside the containerview, containerview height will update as subview height changed.when Bzcardview display,it will hide containerview and when containerview display it will hide Bzcardview. Bazcardview and containerview…
0
votes
1 answer

Adding UINavigationController as child of other UINavigationController

I'm experimenting with adding a UINavigationController as a child of another UINavigationController. The problem I'm facing is that the navigation bar of the child UINavigationController doesn't respect the safe area at the top - the height is too…
rodskagg
  • 3,827
  • 4
  • 27
  • 46
0
votes
2 answers

size(forChildContentContainer container: UIContentContainer,withParentContainerSize parentSize: CGSize) does not work

Apple says: "Container view controllers use this method to return the sizes for their child view controllers. UIKit calls the method as part of the default implementation of the viewWillTransition(to:with:) method for view controllers" And when i…
Ninja
  • 309
  • 7
  • 26