Make navigation and toolbars transparent. Issue #1413
This commit is contained in:
parent
d4722f766f
commit
2ea8253e25
|
@ -69,10 +69,6 @@ struct AppAssets {
|
|||
return UIColor(named: "iconBackgroundColor")!
|
||||
}()
|
||||
|
||||
static var barBackgroundColor: UIColor = {
|
||||
return UIColor(named: "barBackgroundColor")!
|
||||
}()
|
||||
|
||||
static var circleClosedImage: UIImage = {
|
||||
return UIImage(systemName: "largecircle.fill.circle")!
|
||||
}()
|
||||
|
|
|
@ -124,6 +124,16 @@ class ArticleViewController: UIViewController {
|
|||
|
||||
self.webView = webView
|
||||
self.webViewContainer.addChildAndPin(webView)
|
||||
|
||||
webView.translatesAutoresizingMaskIntoConstraints = false
|
||||
self.webViewContainer.addSubview(webView)
|
||||
NSLayoutConstraint.activate([
|
||||
self.webViewContainer.leadingAnchor.constraint(equalTo: webView.leadingAnchor),
|
||||
self.webViewContainer.trailingAnchor.constraint(equalTo: webView.trailingAnchor),
|
||||
self.webViewContainer.topAnchor.constraint(equalTo: webView.topAnchor),
|
||||
self.webViewContainer.bottomAnchor.constraint(equalTo: webView.bottomAnchor)
|
||||
])
|
||||
|
||||
webView.navigationDelegate = self
|
||||
webView.uiDelegate = self
|
||||
self.configureContextMenuInteraction()
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DNb-lt-KzC">
|
||||
<rect key="frame" x="0.0" y="88" width="414" height="725"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
||||
</view>
|
||||
<view opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iEi-hX-TYy">
|
||||
|
@ -38,9 +38,9 @@
|
|||
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="VUw-jc-0yf" firstAttribute="bottom" secondItem="iEi-hX-TYy" secondAttribute="top" id="4fZ-pn-fmB"/>
|
||||
<constraint firstItem="DNb-lt-KzC" firstAttribute="top" secondItem="VUw-jc-0yf" secondAttribute="top" id="Bfh-RL-m4d"/>
|
||||
<constraint firstItem="DNb-lt-KzC" firstAttribute="top" secondItem="svH-Pt-448" secondAttribute="top" id="Bfh-RL-m4d"/>
|
||||
<constraint firstItem="A7j-8T-DqE" firstAttribute="trailing" secondItem="VUw-jc-0yf" secondAttribute="trailing" id="Feu-hj-K01"/>
|
||||
<constraint firstItem="DNb-lt-KzC" firstAttribute="bottom" secondItem="VUw-jc-0yf" secondAttribute="bottom" id="FfW-6G-Bcp"/>
|
||||
<constraint firstItem="DNb-lt-KzC" firstAttribute="bottom" secondItem="svH-Pt-448" secondAttribute="bottom" id="FfW-6G-Bcp"/>
|
||||
<constraint firstItem="VUw-jc-0yf" firstAttribute="trailing" secondItem="iEi-hX-TYy" secondAttribute="trailing" id="Ij6-ri-sBN"/>
|
||||
<constraint firstItem="iEi-hX-TYy" firstAttribute="leading" secondItem="VUw-jc-0yf" secondAttribute="leading" id="Muc-gr-S7o"/>
|
||||
<constraint firstItem="DNb-lt-KzC" firstAttribute="trailing" secondItem="VUw-jc-0yf" secondAttribute="trailing" id="QJ5-Ne-ndd"/>
|
||||
|
@ -155,7 +155,6 @@
|
|||
<outlet property="delegate" destination="Kyk-vK-QRX" id="rH3-5N-a6z"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<extendedEdge key="edgesForExtendedLayout" top="YES"/>
|
||||
<toolbarItems>
|
||||
<barButtonItem title="Mark All as Read" id="fTv-eX-72r">
|
||||
<connections>
|
||||
|
|
|
@ -58,17 +58,14 @@ private extension InteractiveNavigationController {
|
|||
|
||||
func configure() {
|
||||
isToolbarHidden = false
|
||||
view.backgroundColor = AppAssets.barBackgroundColor
|
||||
|
||||
let navigationAppearance = UINavigationBarAppearance()
|
||||
navigationAppearance.backgroundColor = AppAssets.barBackgroundColor
|
||||
navigationAppearance.titleTextAttributes = [.foregroundColor: UIColor.label]
|
||||
navigationAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor.label]
|
||||
navigationBar.standardAppearance = navigationAppearance
|
||||
navigationBar.tintColor = AppAssets.primaryAccentColor
|
||||
|
||||
let toolbarAppearance = UIToolbarAppearance()
|
||||
toolbarAppearance.backgroundColor = AppAssets.barBackgroundColor
|
||||
toolbar.standardAppearance = toolbarAppearance
|
||||
toolbar.compactAppearance = toolbarAppearance
|
||||
toolbar.tintColor = AppAssets.primaryAccentColor
|
||||
|
|
Loading…
Reference in New Issue