Note that there are some explanatory texts on larger screens.

plurals
  1. POPresent multiple modal view controllers?
    primarykey
    data
    text
    <p><strong>update:</strong><br> I've faced this problem again, and found another way. If presenting controller is not embedded in navigation controller, it will be hidden if presented controller is not fullscreen and will became black. Method setModalPresentationStyle:UIModalPresentationCurrentContext can be applied only to navigation controller. So embed presenting controller in UINavigationController, set UIModalPresentationCurrentContext to it and present new controller - you will get dialog controller.</p> <p>I'm presenting search controller, it have tableView that push on stack detailed controller.</p> <p>Detailed controller can present view controller with message, it consists from small UIView and semitransparent background.</p> <p>Problem: when last view controller presented, all view controllers under it becomes hidden and controller, that presented search controller becomes visible.</p> <p>Here what I'm doing:</p> <pre><code>SearchViewController *viewController = [[SearchViewController alloc] initWithNibName:@"SearchViewController" bundle:nil]; viewController.data = dataArray; UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; [self.navigationController setModalPresentationStyle:UIModalPresentationCurrentContext]; [self.navigationController presentViewController:navigationController animated:YES completion:nil]; </code></pre> <p>than table pushes detailed view:</p> <pre><code>DetailViewController *viewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil]; [viewController setHidesBottomBarWhenPushed:YES]; viewController.dataItem = [data objectAtIndex:(NSUInteger) [indexPath row]]; [self.navigationController pushViewController:viewController animated:YES]; </code></pre> <p>and detailed view presenting message box:</p> <pre><code>MessageController *controller = [[MessageController alloc] initWithNibName:@"MessageController" bundle:nil]; controller.message = message; [self presentViewController:controller animated:YES completion:nil]; </code></pre> <p>When it's dismissed, all controllers under it became visible.</p> <p><strong>update:</strong></p> <p>all I wanted is to present modally a view controller that will have uitableview. From this table to show detailed view that will be able to show message box. Message box must be another view controller. And when message box is shown all two preceding controllers disappears. that is the issue.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload