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)

81 questions
1
vote
2 answers

Accessing parent view controller

I have a mainViewController with a container view in it. I'm trying to access theMainViewController from the container view. Here is my code: self.theMainViewController = (theMainViewController *)self.parentViewController; NSIndexPath *indexPath =…
1
vote
2 answers

How to create transparent, modal UIViewController on iPhones iOS7+?

I have a relatively simple question that I can't seem to figure out. I'm inside of a UIViewController (myViewController) that's embedded somewhere inside a UIViewController hierarchy (somewhere underneath a parent…
1
vote
3 answers

iPhone: Calling dealloc on parentViewController causes an exception

I'm dealing with viewDidUnload and dealloc methods and I've founded a problem when calling [super dealloc]; in parent view controller. I have a lot of view controllers with custom code which I have putted outside on a parent view controller. So,…
arielcamus
  • 773
  • 1
  • 8
  • 24
1
vote
1 answer

Accessing parentViewController's variables

I want to allow a pushed to set parentViewController's instance variables. For instance, VC1 (the parent) has a bunch of textfields and what not which are filled from VC2 (the child). VC2 is pushed onto the stack by VC1. I've tried doing like…
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
0 answers

Show subview on top (and centered) of parent view centered to the screen

I've a screen: The container view load a xib(UIViewController) as a sub view with no problems. When I load another xib(UIViewController) as a sub view (dialog): But the dialog view loads on top of the container view. I want to dialog view show in…
Idan Moshe
  • 1,675
  • 4
  • 28
  • 65
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
1
vote
1 answer

Getting current UIViewController in Phonegap

I'm loading an application (via embedded framework) via a PhoneGap Plugin. Now, I'm trying to pass the current UIViewController to the parentViewController property of the FlashizFacade object. When I execute my application I'm getting this error…
0
votes
1 answer

Is it usually a bad sign that I am relying on self.parentViewController and/or self.presentingViewController in my design

I have a SubSelectVC that handles sub-selection choice that is presented modally from a SearchVC. The SubSelectVC has a -(void)didSelectRowAtIndexPath that performs these options, roughly: if ([[[UIDevice currentDevice] systemVersion] intValue] < 5)…
tacos_tacos_tacos
  • 10,277
  • 11
  • 73
  • 126
0
votes
1 answer

does a modalviewcontroller resignFirstResponder of the parentviews subviews?

in order to recognize if a user jumps from editing one textField to another by just touching another one instead of hitting the return button i implemented a method which gets called with the event "Editing did end". i read this event also happens…
0
votes
2 answers

Call function of child view instance from parent view controller

I have a motherView controlled by motherViewController with a container view in it. The container view is controlled by an childViewController. The childView holds an tableView. Now I have a cleanTableView function in the childViewController, which…
Womble Tristes
  • 393
  • 1
  • 4
  • 14
0
votes
1 answer

How to get parent of child view controller?

I have a view controllerA with segmented control, and I have added two view controller's(B & C) views in controllerA on different segment selection.I have one button each on controllerB and controllerC.On button click of each controllerB &…
0
votes
1 answer

Cell in many different ViewControllers

I have a cell which I use in many different vc because I have my app divided in different categories but all use the same cell. Now I have a button which should trigger the event to share it via other apps like whastapp or facebook. The problem is…
0
votes
1 answer

Send data back to parentviewController from childViewController

Added a child view controller as below: // ParentViewController if ((self.delegate?.showPopupSymtomDetailViewController(view: viewController, receiver: self)) != nil) { } // ChildViewController //MARK: PopUpCode func…
iPhone 7
  • 1,731
  • 1
  • 27
  • 63
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…