Skip to content

Commit 1c91c2f

Browse files
committed
Remove toolbar changes around animation
1 parent b55d09f commit 1c91c2f

File tree

3 files changed

+1
-21
lines changed

3 files changed

+1
-21
lines changed

BrowserKit/Sources/Common/Extensions/UIStackViewExtension.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ extension UIStackView {
3939
animateClosure: @escaping () -> Void,
4040
animated: Bool = true,
4141
completion: (() -> Void)?) {
42-
view.layoutIfNeeded()
43-
4442
UIView.animate(
4543
withDuration: animated ? 0.25 : 0,
4644
animations: {

firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ class BrowserViewController: UIViewController,
108108
var zoomPageBar: ZoomPageBar?
109109
var addressBarPanGestureHandler: AddressBarPanGestureHandler?
110110
var microsurvey: MicrosurveyPromptView?
111-
var keyboardBackdrop: UIView?
112111
var pendingToast: Toast? // A toast that might be waiting for BVC to appear before displaying
113112
var downloadToast: DownloadToast? // A toast that is showing the combined download progress
114113
var downloadProgressManager: DownloadProgressManager?
@@ -2227,18 +2226,6 @@ class BrowserViewController: UIViewController,
22272226

22282227
guard let searchController = self.searchController else { return }
22292228

2230-
// This needs to be added to ensure during animation of the keyboard,
2231-
// No content is showing in between the bottom search bar and the searchViewController
2232-
if isBottomSearchBar, keyboardBackdrop == nil {
2233-
keyboardBackdrop = UIView()
2234-
keyboardBackdrop?.backgroundColor = currentTheme().colors.layer1
2235-
view.insertSubview(keyboardBackdrop!, belowSubview: overKeyboardContainer)
2236-
keyboardBackdrop?.snp.makeConstraints { make in
2237-
make.edges.equalTo(view)
2238-
}
2239-
view.bringSubviewToFront(bottomContainer)
2240-
}
2241-
22422229
addChild(searchController)
22432230
view.addSubview(searchController.view)
22442231
searchController.view.translatesAutoresizingMaskIntoConstraints = false
@@ -2267,9 +2254,6 @@ class BrowserViewController: UIViewController,
22672254
searchController.view.removeFromSuperview()
22682255
searchController.removeFromParent()
22692256

2270-
keyboardBackdrop?.removeFromSuperview()
2271-
keyboardBackdrop = nil
2272-
22732257
contentContainer.accessibilityElementsHidden = false
22742258
}
22752259

@@ -3861,7 +3845,7 @@ class BrowserViewController: UIViewController,
38613845
let currentTheme = currentTheme()
38623846
statusBarOverlay.hasTopTabs = toolbarHelper.shouldShowTopTabs(for: traitCollection)
38633847
statusBarOverlay.applyTheme(theme: currentTheme)
3864-
keyboardBackdrop?.backgroundColor = currentTheme.colors.layer1
3848+
zeroSearchDimmingView.backgroundColor = currentTheme.colors.layerScrim.withAlphaComponent(0.70)
38653849

38663850
// to make sure on homepage with bottom search bar the status bar is hidden
38673851
// we have to adjust the background color to match the homepage background color

firefox-ios/Client/Frontend/Components/BaseAlphaStackView.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ class BaseAlphaStackView: UIStackView, AlphaDimmable, ThemeApplicable {
102102
spacer.bottomAnchor.constraint(equalTo: self.bottomAnchor)
103103
])
104104
insetSpacer = spacer
105-
layoutIfNeeded()
106105
}
107106

108107
func moveSpacerToBack() {
@@ -115,7 +114,6 @@ class BaseAlphaStackView: UIStackView, AlphaDimmable, ThemeApplicable {
115114

116115
removeArrangedView(insetSpacer)
117116
self.insetSpacer = nil
118-
layoutIfNeeded()
119117
}
120118

121119
func applyTheme(theme: Theme) {

0 commit comments

Comments
 (0)