diff --git a/Package.swift b/Package.swift index 5b2748972b27a5de2d88ac37bd48c9c6196bcf11..b6116630deb1c9f8e99234c1db82286d9f49286e 100644 --- a/Package.swift +++ b/Package.swift @@ -203,9 +203,6 @@ let package = Package( ), .target( name: "WebsiteFeature", - dependencies: [ - .target(name: "AppResources"), - ], swiftSettings: swiftSettings ), .target( diff --git a/Sources/AppNavigation/PresentWebsite.swift b/Sources/AppNavigation/PresentWebsite.swift index 02abd2eef9dfb3709e1704d66c662b93524d6471..bdd2b918137e07a3e9f53b9dbac9550786b5448e 100644 --- a/Sources/AppNavigation/PresentWebsite.swift +++ b/Sources/AppNavigation/PresentWebsite.swift @@ -40,7 +40,9 @@ public struct PresentWebsiteNavigator: TypedNavigator { public func perform(_ action: PresentWebsite, completion: @escaping () -> Void) { action.parent.present( - viewController(action.urlString), + UINavigationController( + rootViewController: viewController(action.urlString) + ), animated: action.animated, completion: completion ) diff --git a/Sources/WebsiteFeature/WebsiteController.swift b/Sources/WebsiteFeature/WebsiteController.swift index fd7599713b58305b9fdbd9e13df178f3f3793a32..dacb0998608f3f43972f01458dcca6e6357c2c8c 100644 --- a/Sources/WebsiteFeature/WebsiteController.swift +++ b/Sources/WebsiteFeature/WebsiteController.swift @@ -1,6 +1,5 @@ import UIKit import WebKit -import AppResources public final class WebsiteController: UIViewController { private lazy var webView = WKWebView() @@ -13,26 +12,7 @@ public final class WebsiteController: UIViewController { } public override func loadView() { - 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 + view = webView } required init?(coder: NSCoder) { nil }