@capgo/capacitor-inappbrowser 8.7.0-beta.pr596.340.1 → 8.7.0-beta.pr598.351.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -756,40 +756,62 @@ open class WKWebViewController: UIViewController, WKScriptMessageHandler {
|
|
|
756
756
|
return windowScene?.statusBarManager?.statusBarFrame.height ?? 0
|
|
757
757
|
}
|
|
758
758
|
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
759
|
+
private func applyNavigationBarBackground(color: UIColor) {
|
|
760
|
+
guard let navigationBar = navigationController?.navigationBar else {
|
|
761
|
+
return
|
|
762
|
+
}
|
|
763
763
|
|
|
764
|
-
|
|
765
|
-
|
|
764
|
+
navigationBar.backgroundColor = color
|
|
765
|
+
navigationBar.barTintColor = color
|
|
766
|
+
navigationBar.isTranslucent = false
|
|
767
|
+
navigationBar.setBackgroundImage(UIImage(), for: .default)
|
|
768
|
+
navigationBar.shadowImage = UIImage()
|
|
769
|
+
navigationBar.setValue(true, forKey: "hidesShadow")
|
|
766
770
|
|
|
767
|
-
if
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
+
if #available(iOS 13.0, *) {
|
|
772
|
+
let appearance = UINavigationBarAppearance()
|
|
773
|
+
appearance.configureWithOpaqueBackground()
|
|
774
|
+
appearance.backgroundColor = color
|
|
775
|
+
appearance.backgroundEffect = nil
|
|
776
|
+
appearance.shadowColor = .clear
|
|
777
|
+
appearance.shadowImage = UIImage()
|
|
771
778
|
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
779
|
+
if let titleTextAttributes = navigationBar.titleTextAttributes {
|
|
780
|
+
appearance.titleTextAttributes = titleTextAttributes
|
|
781
|
+
}
|
|
782
|
+
if let largeTitleTextAttributes = navigationBar.largeTitleTextAttributes {
|
|
783
|
+
appearance.largeTitleTextAttributes = largeTitleTextAttributes
|
|
784
|
+
}
|
|
775
785
|
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
])
|
|
786
|
+
navigationBar.standardAppearance = appearance
|
|
787
|
+
navigationBar.compactAppearance = appearance
|
|
788
|
+
navigationBar.scrollEdgeAppearance = appearance
|
|
789
|
+
navigationBar.compactScrollEdgeAppearance = appearance
|
|
790
|
+
}
|
|
791
|
+
}
|
|
783
792
|
|
|
784
|
-
|
|
785
|
-
|
|
793
|
+
// Make status bar background with colored view underneath
|
|
794
|
+
open func setupStatusBarBackground(color: UIColor) {
|
|
795
|
+
statusBarBackgroundView?.removeFromSuperview()
|
|
796
|
+
statusBarBackgroundView = UIView()
|
|
786
797
|
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
navigationController?.navigationBar.isTranslucent = true
|
|
798
|
+
guard let navController = navigationController,
|
|
799
|
+
let navView = navController.view,
|
|
800
|
+
let statusBarBackgroundView else {
|
|
801
|
+
return
|
|
792
802
|
}
|
|
803
|
+
navView.insertSubview(statusBarBackgroundView, at: 0)
|
|
804
|
+
statusBarBackgroundView.translatesAutoresizingMaskIntoConstraints = false
|
|
805
|
+
statusBarBackgroundView.backgroundColor = color
|
|
806
|
+
|
|
807
|
+
NSLayoutConstraint.activate([
|
|
808
|
+
statusBarBackgroundView.topAnchor.constraint(equalTo: navView.topAnchor),
|
|
809
|
+
statusBarBackgroundView.leadingAnchor.constraint(equalTo: navView.leadingAnchor),
|
|
810
|
+
statusBarBackgroundView.trailingAnchor.constraint(equalTo: navView.trailingAnchor),
|
|
811
|
+
statusBarBackgroundView.bottomAnchor.constraint(equalTo: navController.navigationBar.bottomAnchor, constant: 1)
|
|
812
|
+
])
|
|
813
|
+
|
|
814
|
+
applyNavigationBarBackground(color: color)
|
|
793
815
|
}
|
|
794
816
|
|
|
795
817
|
// Override to use our custom status bar style
|
package/package.json
CHANGED