Change Feeds background color and update to emulate plain style tables more closely. Issue #1224
This commit is contained in:
parent
b78b996e88
commit
5720034f19
|
@ -173,7 +173,7 @@
|
|||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="r7i-6Z-zg0">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" id="zNG-5C-pQm" customClass="MasterFeedTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="55.5" width="414" height="43.5"/>
|
||||
|
@ -182,6 +182,7 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
|
|
|
@ -169,7 +169,7 @@ private extension MasterFeedTableViewSectionHeader {
|
|||
|
||||
func addBackgroundView() {
|
||||
self.backgroundView = UIView(frame: self.bounds)
|
||||
self.backgroundView?.backgroundColor = UIColor.systemGroupedBackground
|
||||
self.backgroundView?.backgroundColor = UIColor.secondarySystemBackground
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,13 +7,21 @@
|
|||
{
|
||||
"idiom" : "universal",
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"red" : "1.000",
|
||||
"alpha" : "1.000",
|
||||
"blue" : "1.000",
|
||||
"green" : "1.000"
|
||||
"platform" : "ios",
|
||||
"reference" : "systemBackgroundColor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"color" : {
|
||||
"platform" : "ios",
|
||||
"reference" : "systemBackgroundColor"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -32,27 +32,28 @@ class ThemedNavigationController: UINavigationController {
|
|||
private func configure() {
|
||||
isToolbarHidden = false
|
||||
|
||||
if traitCollection.userInterfaceStyle == .dark {
|
||||
navigationBar.standardAppearance = UINavigationBarAppearance()
|
||||
navigationBar.tintColor = AppAssets.primaryAccentColor
|
||||
toolbar.standardAppearance = UIToolbarAppearance()
|
||||
toolbar.compactAppearance = UIToolbarAppearance()
|
||||
toolbar.tintColor = AppAssets.primaryAccentColor
|
||||
} else {
|
||||
let navigationAppearance = UINavigationBarAppearance()
|
||||
navigationAppearance.backgroundColor = AppAssets.barBackgroundColor
|
||||
let backgroundImage = AppAssets.barBackgroundColor.image()
|
||||
navigationAppearance.backgroundImage = backgroundImage
|
||||
navigationAppearance.titleTextAttributes = [.foregroundColor: UIColor.label]
|
||||
navigationAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor.label]
|
||||
navigationBar.standardAppearance = navigationAppearance
|
||||
navigationBar.tintColor = AppAssets.primaryAccentColor
|
||||
|
||||
let toolbarAppearance = UIToolbarAppearance()
|
||||
toolbarAppearance.backgroundColor = UIColor.white
|
||||
toolbarAppearance.backgroundImage = backgroundImage
|
||||
toolbar.standardAppearance = toolbarAppearance
|
||||
toolbar.compactAppearance = toolbarAppearance
|
||||
toolbar.tintColor = AppAssets.primaryAccentColor
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension UIColor {
|
||||
func image(_ size: CGSize = CGSize(width: 1, height: 1)) -> UIImage {
|
||||
return UIGraphicsImageRenderer(size: size).image { rendererContext in
|
||||
self.setFill()
|
||||
rendererContext.fill(CGRect(origin: .zero, size: size))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue