parentviewcontroller

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 set it? Obviously, UINavigationController can set the property somehow in -pushViewContro...

if parentViewContoller statement

I'm writing a program with a UITableView with and add button in the Navigation Bar which leads to an edit page. When you click on an item in the table, a view (rView) is pushed with information pertaining to that item. This view has an edit button that also leads to the edit page. Is there a way that I could put an if statement for the ...

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 ViewControllers and nib files for those pieces. In order to do this I have done the following: 1. Crea...

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 parentViewController.myString = "foo"; however since parentViewController is a UIViewController,...

iPhone: Calling dealloc on parentViewController causes an exception

Hi, 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, when defining my view controllers I set a reference to the super class: @interface Log...

UIViewController parentViewController access properties

I know this question has been asked several times and I did read existing posts on this topic but I still need help. I have 2 UIViewControllers - Parent and Child. I display the child view using the presentModalViewController as below: ChildController *child = [[ChildController alloc[ initWithNibName:@"ChildView" bundle:nil]; [self pr...

Reload ParentViewController

Hi, I have an iPhone application where i'm showing a settings page using modal view [self presentmodalviewcontroller:tempcontroller animated:yes]; When the user finishes the settings he can come back to the previous page. [self.dismissmodalviewcontroller animated:YES]; Now i want to reload my main page when user comes back from the ...

Calling a method back on the parent controller without a warning message

I have a front-view and a flip-view much like the utility weather-app. To avoid dealing with the complexities of protocols... on my flipView I need to call some code that resides back on my front-view. This works... but generates a warning during compile. [self.parentViewController returningFromGetStringView]; Warnings (shows twice)...

Cannot resolve view of the parent controller

Create a controller: public abstract class MyBaseController : Controller { public ActionResult MyAction(string id) { return View(); } } Than create another specific controller that inherit from MyBaseController: public class MyController : MyBaseController { } There is a view called MyAction.aspx in the Views/MyBas...