tags:

views:

83

answers:

0

What I need is to correctly dismiss the picker controller's modal view with all subviews (some kind of AR app) and show app's features or in other case a map, and following code gets me only a blank screen:

- (id)init {
    ...
    self.cameraController = [[[UIImagePickerController alloc] init] autorelease];
    self.cameraController.sourceType = UIImagePickerControllerSourceTypeCamera;
    ...
}
- (void)loadView {
    ...
    self.view = overlayView;
}
- (void)viewDidAppear:(BOOL)animated {
    [self.cameraController setCameraOverlayView:overlayView];
    [self presentModalViewController:self.cameraController animated:NO];
    ....
}
- (void)preferencesButtonTapped {
    [self.cameraController dismissModalViewControllerAnimated:YES];
    [self.cameraController.view.superview removeFromSuperview];
    PreferencesViewController *preferencesViewController = [[PreferencesViewController alloc] initWithNibName: @"PreferencesViewController" bundle:nil];
    preferencesViewController.delegate = self;
    UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:preferencesViewController];
    [self presentModalViewController:navigationController animated:YES];
    [navigationController release];
    [preferencesViewController release];
}

In standalone application PreferencesViewController works great. And one more question - after I dismiss my modal view - underneath view works like nothing happens except I change it's behavior for this case (in my case it probably can provoke didRecieveMemoryWaring because of using rather big SQLite database), or should I redraw it manually, ?