From 45e505cf043b71576aa23c186b8584d39ce3123e Mon Sep 17 00:00:00 2001 From: Mohamed Barry Date: Sat, 25 Jan 2020 16:53:07 +0100 Subject: [PATCH 1/3] view of NoOfferViewController is not autorisized --- .../KinEcosystem/View/notNibs/OffersViewController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/KinEcosystem/KinEcosystem/View/notNibs/OffersViewController.swift b/KinEcosystem/KinEcosystem/View/notNibs/OffersViewController.swift index a3773dc..f3402f0 100644 --- a/KinEcosystem/KinEcosystem/View/notNibs/OffersViewController.swift +++ b/KinEcosystem/KinEcosystem/View/notNibs/OffersViewController.swift @@ -197,6 +197,7 @@ extension OffersViewController: UICollectionViewDelegate, UICollectionViewDataSo } else { if children.first(where: { $0 is NoOffersViewController }) == nil { let noOffersViewController = NoOffersViewController(nibName: "NoOffersViewController", bundle: KinBundle.ecosystem.rawValue) + noOffersViewController.view.translatesAutoresizingMaskIntoConstraints = false addChild(noOffersViewController) view.addSubview(noOffersViewController.view) NSLayoutConstraint.activate([ From 2d3dfcde08d955b2d2100d78e5994421f18fb110 Mon Sep 17 00:00:00 2001 From: Mohamed Barry Date: Sat, 25 Jan 2020 16:56:52 +0100 Subject: [PATCH 2/3] Make MicDrop image top margin >= 200 Safe Area --- .../View/nibs/NoOffersViewController.xib | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/KinEcosystem/KinEcosystem/View/nibs/NoOffersViewController.xib b/KinEcosystem/KinEcosystem/View/nibs/NoOffersViewController.xib index ee74992..0a5908f 100644 --- a/KinEcosystem/KinEcosystem/View/nibs/NoOffersViewController.xib +++ b/KinEcosystem/KinEcosystem/View/nibs/NoOffersViewController.xib @@ -1,11 +1,9 @@ - - - - + + - + @@ -42,9 +40,11 @@ Label - + + + From a153224652517ad39dc6cd08110fba49d8297723 Mon Sep 17 00:00:00 2001 From: Mohamed Barry Date: Sat, 25 Jan 2020 16:57:49 +0100 Subject: [PATCH 3/3] computing bcSafeAreaLayoutGuide only once --- .../KinEcosystem/View/notNibs/SheetViewController.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/KinEcosystem/KinEcosystem/View/notNibs/SheetViewController.swift b/KinEcosystem/KinEcosystem/View/notNibs/SheetViewController.swift index 0bb3c57..ab227fb 100644 --- a/KinEcosystem/KinEcosystem/View/notNibs/SheetViewController.swift +++ b/KinEcosystem/KinEcosystem/View/notNibs/SheetViewController.swift @@ -110,11 +110,12 @@ class SheetNavigationControllerWrapper: UIViewController, SheetPresented, Themed view.addSubview(wrappedNavigationController.view) addChild(wrappedNavigationController) wrappedNavigationController.didMove(toParent: self) + let safeArea = bcSafeAreaLayoutGuide NSLayoutConstraint.activate([ - wrappedNavigationController.view.topAnchor.constraint(equalTo: bcSafeAreaLayoutGuide.topAnchor, constant: 16.0), - wrappedNavigationController.view.leftAnchor.constraint(equalTo: bcSafeAreaLayoutGuide.leftAnchor, constant: 0.0), - wrappedNavigationController.view.rightAnchor.constraint(equalTo: bcSafeAreaLayoutGuide.rightAnchor, constant: 0.0), - wrappedNavigationController.view.bottomAnchor.constraint(equalTo: bcSafeAreaLayoutGuide.bottomAnchor, constant: 0.0) + wrappedNavigationController.view.topAnchor.constraint(equalTo: safeArea.topAnchor, constant: 16.0), + wrappedNavigationController.view.leftAnchor.constraint(equalTo: safeArea.leftAnchor, constant: 0.0), + wrappedNavigationController.view.rightAnchor.constraint(equalTo: safeArea.rightAnchor, constant: 0.0), + wrappedNavigationController.view.bottomAnchor.constraint(equalTo: safeArea.bottomAnchor, constant: 0.0) ]) view.setNeedsLayout() }