diff --git a/YandexCheckoutPayments.xcodeproj/xcshareddata/xcschemes/ExampleCarthage.xcscheme b/YandexCheckoutPayments.xcodeproj/xcshareddata/xcschemes/ExampleCarthage.xcscheme
index b591c622..5ba169f4 100644
--- a/YandexCheckoutPayments.xcodeproj/xcshareddata/xcschemes/ExampleCarthage.xcscheme
+++ b/YandexCheckoutPayments.xcodeproj/xcshareddata/xcschemes/ExampleCarthage.xcscheme
@@ -65,6 +65,10 @@
+
+
Void)? = nil) {
- actionSheet.willMove(toParentViewController: nil)
-
actionSheet.beginAppearanceTransition(false, animated: true)
+ actionSheet.willMove(toParentViewController: nil)
NSLayoutConstraint.deactivate(containerConstraints)
@@ -414,8 +409,8 @@ class TokenizationViewController: UIViewController {
}
private func hideAnimated(pageSheet: PageSheetTemplate, completion: (() -> Void)? = nil) {
- pageSheet.willMove(toParentViewController: nil)
pageSheet.beginAppearanceTransition(false, animated: true)
+ pageSheet.willMove(toParentViewController: nil)
NSLayoutConstraint.deactivate(containerConstraints)
let dismissConstraint = [
@@ -448,13 +443,15 @@ class TokenizationViewController: UIViewController {
modules.append(vc)
addChildViewController(modalTemplate)
- modalTemplate.beginAppearanceTransition(true, animated: true)
modalTemplate.view.translatesAutoresizingMaskIntoConstraints = false
+ modalTemplate.view.frame = view.bounds
view.addSubview(modalTemplate.view)
modalTemplate.addChildViewController(vc)
modalTemplate.setContentView(vc.view)
+ modalTemplate.beginAppearanceTransition(true, animated: true)
+
let startConstraints = [
modalTemplate.view.leading.constraint(equalTo: view.leading),
modalTemplate.view.top.constraint(equalTo: view.bottom),
@@ -482,10 +479,11 @@ class TokenizationViewController: UIViewController {
self.view.layoutIfNeeded()
},
completion: { _ in
- modalTemplate.endAppearanceTransition()
modalTemplate.didMove(toParentViewController: self)
-
vc.didMove(toParentViewController: modalTemplate)
+
+ modalTemplate.endAppearanceTransition()
+
self.modalTemplate = modalTemplate
completion?()
})
@@ -502,8 +500,8 @@ class TokenizationViewController: UIViewController {
pageSheet.addChildViewController(vc)
vc.view.translatesAutoresizingMaskIntoConstraints = false
pageSheet.setContentView(vc.view)
+
pageSheet.beginAppearanceTransition(true, animated: true)
- vc.beginAppearanceTransition(true, animated: true)
let startConstraints = [
pageSheet.view.leading.constraint(equalTo: view.leading),
@@ -534,16 +532,18 @@ class TokenizationViewController: UIViewController {
self.view.layoutIfNeeded()
},
completion: { _ in
- pageSheet.endAppearanceTransition()
- vc.endAppearanceTransition()
pageSheet.didMove(toParentViewController: self)
vc.didMove(toParentViewController: pageSheet)
+
+ pageSheet.endAppearanceTransition()
+
+ vc.removeKeyboardObservers()
+
+ self.pageSheetTemplate = pageSheet
completion?()
})
- vc.removeKeyboardObservers()
modules.append(vc)
- self.pageSheetTemplate = pageSheet
}
private func presentActionSheetAnimated(_ vc: UIViewController, completion: (() -> Void)? = nil) {
@@ -551,10 +551,11 @@ class TokenizationViewController: UIViewController {
actionSheetTemplate.delegate = self
addChildViewController(actionSheetTemplate)
- actionSheetTemplate.beginAppearanceTransition(true, animated: false)
actionSheetTemplate.addChildViewController(vc)
vc.didMove(toParentViewController: actionSheetTemplate)
+ actionSheetTemplate.beginAppearanceTransition(true, animated: true)
+
view.addSubview(actionSheetTemplate.view)
actionSheetTemplate.dummyView.addSubview(vc.view)
@@ -595,9 +596,10 @@ class TokenizationViewController: UIViewController {
self.view.layoutIfNeeded()
},
completion: { _ in
- actionSheetTemplate.endAppearanceTransition()
actionSheetTemplate.didMove(toParentViewController: self)
+ actionSheetTemplate.endAppearanceTransition()
+
completion?()
})
@@ -677,9 +679,6 @@ class TokenizationViewController: UIViewController {
pageSheet.dummyView.setNeedsLayout()
pageSheet.dummyView.layoutIfNeeded()
- pvc.beginAppearanceTransition(false, animated: true)
- nvc.beginAppearanceTransition(true, animated: true)
-
NSLayoutConstraint.deactivate(startConstraints)
pageSheet.setContentView(nvc.view)
@@ -698,11 +697,9 @@ class TokenizationViewController: UIViewController {
pageSheet.view.layoutIfNeeded()
},
completion: { _ in
- nvc.endAppearanceTransition()
nvc.didMove(toParentViewController: pageSheet)
})
- pvc.endAppearanceTransition()
pvc.removeFromParentViewController()
self.modules.append(nvc)