Skip to content
Snippets Groups Projects
Commit 665b4ff3 authored by Bruno Muniz's avatar Bruno Muniz :apple:
Browse files

Fix dismissing webscreen

parent b6db0f19
No related branches found
No related tags found
1 merge request!103Fix dismissing webscreen
...@@ -203,6 +203,9 @@ let package = Package( ...@@ -203,6 +203,9 @@ let package = Package(
), ),
.target( .target(
name: "WebsiteFeature", name: "WebsiteFeature",
dependencies: [
.target(name: "AppResources"),
],
swiftSettings: swiftSettings swiftSettings: swiftSettings
), ),
.target( .target(
......
import UIKit import UIKit
import WebKit import WebKit
import AppResources
public final class WebsiteController: UIViewController { public final class WebsiteController: UIViewController {
private lazy var webView = WKWebView() private lazy var webView = WKWebView()
...@@ -12,7 +13,26 @@ public final class WebsiteController: UIViewController { ...@@ -12,7 +13,26 @@ public final class WebsiteController: UIViewController {
} }
public override func loadView() { public override func loadView() {
view = webView let screenView = UIView()
let navigationBar = UINavigationBar()
navigationBar.isTranslucent = false
navigationBar.backgroundColor = Asset.neutralLine.color
screenView.addSubview(navigationBar)
screenView.addSubview(webView)
navigationBar.translatesAutoresizingMaskIntoConstraints = false
navigationBar.leftAnchor.constraint(equalTo: screenView.leftAnchor).isActive = true
navigationBar.rightAnchor.constraint(equalTo: screenView.rightAnchor).isActive = true
navigationBar.topAnchor.constraint(equalTo: screenView.safeAreaLayoutGuide.topAnchor).isActive = true
webView.translatesAutoresizingMaskIntoConstraints = false
webView.leftAnchor.constraint(equalTo: screenView.leftAnchor).isActive = true
webView.rightAnchor.constraint(equalTo: screenView.rightAnchor).isActive = true
webView.topAnchor.constraint(equalTo: navigationBar.bottomAnchor).isActive = true
webView.bottomAnchor.constraint(equalTo: screenView.bottomAnchor).isActive = true
view = screenView
} }
required init?(coder: NSCoder) { nil } required init?(coder: NSCoder) { nil }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment