Questions tagged [parentviewcontroller]

parentViewController, in terms of hierarchy, is the immediate view controller above the current view controller. When used in conjunction with childViewController, related methods of both facilitates Apple's iOS in order to combine multiple view controllers in a custom hierarchy (similar in concept to the UISplitViewController class)

82 questions
29
votes
3 answers

Add a child view controller's view to a subview of the parent view controller

I want to add a tableViewController as a child view controller of a containerViewController (shown below). According to Apple's View Controller Programming Guide I can achieve this by the following lines of code inside my containerViewController: …
14
votes
6 answers

How to set parentViewController in UIViewController?

The parentViewController property of UIViewController is readonly, but I am nesting custom view controllers and would like to use this property. However, since it is readonly, and I found no other way to set this property, my quesion is: how do I…
mrueg
  • 8,065
  • 4
  • 41
  • 66
8
votes
3 answers

Container View Controllers - notify parent of action

Say I have a custom container view controller (MainViewController) where I do something like this: - (void)viewDidLoad { [super viewDidLoad]; HomeViewController *homeVC = [[HomeViewController alloc]…
soleil
  • 11,239
  • 29
  • 102
  • 172
7
votes
3 answers

From a containerView, how do you access the view controller containing the container in Swift?

I do have 4 Views with a Headerpart which I outsourced into a containerview to have the same fields and layout on all 4 views. Inside my container im having a lot of labels which i know wanna fill with data. My problem now is, that i have to fill…
XaNNy0
  • 159
  • 1
  • 8
7
votes
3 answers

How to detect touch event in child viewcontroller in ios

I have created a sideview like menu for the iPhone for which I have used container ship concept for adding child view controller in the parent view controller. When user taps on menu button on the navigation bar I just change the frame of child view…
5
votes
2 answers

superview and parentviewcontroller nil after adding a subview

I think I'm missing something fundamental and so I want to ask the community for some help. I'm building an app based around a basic iPhone Utility Application. My MainView and FlipsideView share some elements so I have created separate…
deadroxy
  • 1,609
  • 2
  • 17
  • 22
4
votes
2 answers

Only having one view autorotate in xcode?

Ok so I currently have 3 views and I need only one of them to autorotate to any orientation while the rest stay in portrait. Right now my set up is a splashviewcontroller fades into view A, and inside view A is a button to switch to view B. All I…
davis
  • 1,798
  • 6
  • 25
  • 48
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
7 answers

Shift to Parent View Controller from child view controller - iOS

I have a main Actions View Controller, and on that there is button "Review". Review Button's functionality is : - (IBAction)btnReview:(id)sender { ReviewViewController *vc = [[ReviewViewController alloc]initWithNibName:@"ReviewViewController"…
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
2 answers

iPad: presenting a modal view and my parentViewController is now nil?

I have a couple of modal views that have been working "just fine" and now stopped returning to the parent view controller and "the code has not changed." -- classic problem description. I debugged the modal view dismissing and the parent view…
mobibob
  • 8,030
  • 17
  • 76
  • 126
2
votes
1 answer

How to go back to the previous controller in one click after observing several controllers of the same type on iOS?

We are using MvvmCross 4.4.0 on the our iOS project and I faced the following problem: I need to implement "Item" page with reference to the other "Item" page; I need an instant back navigation from any "Item" page to the previous controller…
2
votes
1 answer

How to hide child view from parent view after some delay

hide child view after few seconds I set time for that but i cant access child viewcontroller in my timer function I tried dissmiss , removefromparent about not worked. only self.view.isHidden = true is worked I can't place it in timer My Parent…
Vinayak Bhor
  • 584
  • 7
  • 18
2
votes
2 answers

iPhone - Accessing the parent viewcontroller?

I have 2 viewcontrollers A, B ViewController A is being displayed on the screen The view of ViewController B is added to the view of ViewController A. How can i access ViewController A from ViewController B without passing a…
aryaxt
  • 69,636
  • 87
  • 281
  • 421
2
votes
3 answers

Passing data back from child view controller

I am a beginner, and I have a project in which I need to pass data back from a childviewcontroller. Specifically, I have a picker view in my container and I want to be able to use it to select an option (say to simplify just a color to chose from an…
1
2 3 4 5 6