PresentModalViewController from UIView
I am trying to call presentModalViewController on a UIViewController to call the "View" address book, however I am facing some problem. The UIViewController, which "controls" the application, simply draws the view to the screen and then lets the view do all of the user interaction processing and so on. But now I need to somehow return the feedback to the UIViewController in order to call the presentModalViewController on the topic. Anyone have any ideas how to do this?
Thanks for any help!
source to share
Assuming your UIView controller is subclassed, you can add a property to it.
@interface MyView : UIView
{
UIViewController *parentController;
}
// Don't use retain or you'll have a circular reference
@property(nonatomic, assign) UIViewController *parentController;
@end
Then, in your UIViewController code, assign self to the property parentController
.
-(void)viewDidLoad
{
myView.parentController = self;
}
Is this what you were? However, the question is, why is your view controller not controlling your opinion?
source to share