Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Unified Diff: remoting/ios/app/client_connection_view_controller.mm

Issue 2928433002: [CRD iOS] Use UINavigationController for view stack manipulation (Closed)
Patch Set: Add comment Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/ios/app/app_delegate.mm ('k') | remoting/ios/app/host_view_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/ios/app/client_connection_view_controller.mm
diff --git a/remoting/ios/app/client_connection_view_controller.mm b/remoting/ios/app/client_connection_view_controller.mm
index 31ad6d816c29e1b8df89e43b3c58333f9507fff1..657ccf95a8f49ecc02eb76d887d47f81ed290e3f 100644
--- a/remoting/ios/app/client_connection_view_controller.mm
+++ b/remoting/ios/app/client_connection_view_controller.mm
@@ -300,15 +300,12 @@ static const CGFloat kKeyboardAnimationTime = 0.3;
[[HostViewController alloc] initWithClient:_client];
_client = nil;
- __weak UIViewController* parentController = self.presentingViewController;
-
- [self dismissViewControllerAnimated:NO
- completion:^{
- [parentController
- presentViewController:hostViewController
- animated:NO
- completion:nil];
- }];
+ // Replaces current (topmost) view controller with |hostViewController|.
+ NSMutableArray* controllers =
+ [self.navigationController.viewControllers mutableCopy];
+ [controllers removeLastObject];
+ [controllers addObject:hostViewController];
+ [self.navigationController setViewControllers:controllers animated:NO];
}
- (void)didProvidePin:(NSString*)pin createPairing:(BOOL)createPairing {
@@ -323,7 +320,7 @@ static const CGFloat kKeyboardAnimationTime = 0.3;
- (void)didTapCancel:(id)sender {
_client = nil;
- [self dismissViewControllerAnimated:YES completion:nil];
+ [self.navigationController popViewControllerAnimated:YES];
}
- (void)hostSessionStatusChanged:(NSNotification*)notification {
« no previous file with comments | « remoting/ios/app/app_delegate.mm ('k') | remoting/ios/app/host_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698