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

Unified Diff: ios/chrome/browser/ui/payments/contact_info_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
Index: ios/chrome/browser/ui/payments/contact_info_edit_coordinator.mm
diff --git a/ios/chrome/browser/ui/payments/contact_info_edit_coordinator.mm b/ios/chrome/browser/ui/payments/contact_info_edit_coordinator.mm
index cec036f3914103a6ab1797c33b00032c787215f5..4b2606802b58e4e32fcbc5c34a9f5ee8ac901f1a 100644
--- a/ios/chrome/browser/ui/payments/contact_info_edit_coordinator.mm
+++ b/ios/chrome/browser/ui/payments/contact_info_edit_coordinator.mm
@@ -31,6 +31,8 @@ using ::AutofillTypeFromAutofillUIType;
@interface ContactInfoEditCoordinator ()
+@property(nonatomic, strong) UINavigationController* navigationController;
+
@property(nonatomic, strong) PaymentRequestEditViewController* viewController;
@property(nonatomic, strong) ContactInfoEditMediator* mediator;
@@ -42,6 +44,7 @@ using ::AutofillTypeFromAutofillUIType;
@synthesize profile = _profile;
@synthesize paymentRequest = _paymentRequest;
@synthesize delegate = _delegate;
+@synthesize navigationController = _navigationController;
@synthesize viewController = _viewController;
@synthesize mediator = _mediator;
@@ -63,16 +66,25 @@ 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.viewController = nil;
+ self.navigationController = nil;
}
#pragma mark - PaymentRequestEditViewControllerValidator

Powered by Google App Engine
This is Rietveld 408576698