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

Unified Diff: ios/chrome/browser/ui/payments/address_edit_coordinator.mm

Issue 2944083003: [Payment Request] Fixes modally presented editors (Closed)
Patch Set: 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 | « no previous file | ios/chrome/browser/ui/payments/address_edit_coordinator_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/payments/address_edit_coordinator.mm
diff --git a/ios/chrome/browser/ui/payments/address_edit_coordinator.mm b/ios/chrome/browser/ui/payments/address_edit_coordinator.mm
index 7765a81421a3ce13b8173fd8281912c448d60e25..ce3e62978c4689c84cfd8b098dfb57dbcaaab31a 100644
--- a/ios/chrome/browser/ui/payments/address_edit_coordinator.mm
+++ b/ios/chrome/browser/ui/payments/address_edit_coordinator.mm
@@ -35,6 +35,8 @@ using ::AutofillTypeFromAutofillUIType;
@property(nonatomic, strong)
CountrySelectionCoordinator* countrySelectionCoordinator;
+@property(nonatomic, strong) UINavigationController* navigationController;
lpromero 2017/06/20 08:46:05 I think I'd go the other way. The nav controller i
Moe 2017/06/20 13:33:00 Done.
+
@property(nonatomic, strong) PaymentRequestEditViewController* viewController;
@property(nonatomic, strong) AddressEditMediator* mediator;
@@ -47,6 +49,7 @@ using ::AutofillTypeFromAutofillUIType;
@synthesize paymentRequest = _paymentRequest;
@synthesize delegate = _delegate;
@synthesize countrySelectionCoordinator = _countrySelectionCoordinator;
+@synthesize navigationController = _navigationController;
@synthesize viewController = _viewController;
@synthesize mediator = _mediator;
@@ -67,18 +70,27 @@ using ::AutofillTypeFromAutofillUIType;
[self.viewController setDataSource:self.mediator];
[self.viewController loadModel];
- [[self baseViewController] presentViewController:self.viewController
+ self.navigationController = [[UINavigationController alloc]
+ initWithRootViewController:_viewController];
+ [self.navigationController
+ setModalPresentationStyle:UIModalPresentationFormSheet];
+ [self.navigationController
+ setModalTransitionStyle:UIModalTransitionStyleCoverVertical];
+ [self.navigationController setNavigationBarHidden:YES];
+
+ [[self baseViewController] presentViewController:self.navigationController
animated:YES
completion:nil];
}
- (void)stop {
- [[self.viewController presentingViewController]
+ [[self.navigationController presentingViewController]
dismissViewControllerAnimated:YES
completion:nil];
[self.countrySelectionCoordinator stop];
self.countrySelectionCoordinator = nil;
self.viewController = nil;
+ self.navigationController = nil;
}
#pragma mark - PaymentRequestEditViewControllerValidator
« no previous file with comments | « no previous file | ios/chrome/browser/ui/payments/address_edit_coordinator_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698