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

Unified Diff: ios/chrome/browser/ui/payments/credit_card_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/credit_card_edit_coordinator.mm
diff --git a/ios/chrome/browser/ui/payments/credit_card_edit_coordinator.mm b/ios/chrome/browser/ui/payments/credit_card_edit_coordinator.mm
index a75fa00cb9ba9ff360025af959ca926981ccd3b4..fcd567105b380246395067a5bffe1b26a265b7dd 100644
--- a/ios/chrome/browser/ui/payments/credit_card_edit_coordinator.mm
+++ b/ios/chrome/browser/ui/payments/credit_card_edit_coordinator.mm
@@ -69,6 +69,8 @@ bool IsValidCreditCardNumber(const base::string16& card_number,
@property(nonatomic, strong)
BillingAddressSelectionCoordinator* billingAddressSelectionCoordinator;
+@property(nonatomic, strong) UINavigationController* navigationController;
+
@property(nonatomic, strong) PaymentRequestEditViewController* viewController;
@property(nonatomic, strong) CreditCardEditViewControllerMediator* mediator;
@@ -82,6 +84,7 @@ bool IsValidCreditCardNumber(const base::string16& card_number,
@synthesize delegate = _delegate;
@synthesize billingAddressSelectionCoordinator =
_billingAddressSelectionCoordinator;
+@synthesize navigationController = _navigationController;
@synthesize viewController = _viewController;
@synthesize mediator = _mediator;
@@ -101,18 +104,27 @@ bool IsValidCreditCardNumber(const base::string16& card_number,
[_viewController setDataSource:_mediator];
[_viewController loadModel];
- [[self baseViewController] presentViewController:_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.billingAddressSelectionCoordinator stop];
self.billingAddressSelectionCoordinator = nil;
- _viewController = nil;
+ self.viewController = nil;
+ self.navigationController = nil;
}
#pragma mark - PaymentRequestEditViewControllerValidator

Powered by Google App Engine
This is Rietveld 408576698