diff --git a/iOS/AppAssets.swift b/iOS/AppAssets.swift index 2a5ed0659..160e5bf2e 100644 --- a/iOS/AppAssets.swift +++ b/iOS/AppAssets.swift @@ -98,9 +98,13 @@ struct AppAssets { }() static var disclosureImage: UIImage = { - return UIImage(named: "disclosure")! + return UIImage(systemName: "chevron.right")! }() + static func disclosureImage(size: CGFloat, weight: UIImage.SymbolWeight) -> UIImage { + return UIImage(systemName: "chevron.right", withConfiguration: UIImage.SymbolConfiguration(pointSize: size, weight: weight))! + } + static var contextMenuReddit: UIImage = { return UIImage(named: "contextMenuReddit")! }() diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift b/iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift index bf9c5a8da..eff30162e 100644 --- a/iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift +++ b/iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift @@ -88,7 +88,7 @@ class MasterFeedTableViewCell : VibrantTableViewCell { label.allowsDefaultTighteningForTruncation = false label.adjustsFontForContentSizeCategory = true label.lineBreakMode = .byTruncatingTail - label.font = .preferredFont(forTextStyle: .body) + label.font = .preferredFont(forTextStyle: .body).bold() return label }() @@ -193,7 +193,7 @@ private extension MasterFeedTableViewCell { func addDisclosureView() { disclosureButton = NonIntrinsicButton(type: .roundedRect) disclosureButton!.addTarget(self, action: #selector(buttonPressed(_:)), for: UIControl.Event.touchUpInside) - disclosureButton?.setImage(AppAssets.disclosureImage, for: .normal) + disclosureButton?.setImage(AppAssets.disclosureImage(size: 16, weight: .regular), for: .normal) disclosureButton?.tintColor = AppAssets.controlBackgroundColor disclosureButton?.imageView?.contentMode = .center disclosureButton?.imageView?.clipsToBounds = false diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift b/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift index ee9cc296b..4ea2199bc 100644 --- a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift +++ b/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift @@ -77,7 +77,7 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView { label.numberOfLines = 0 label.allowsDefaultTighteningForTruncation = false label.adjustsFontForContentSizeCategory = true - label.font = .preferredFont(forTextStyle: .body) + label.font = UIFont.systemFont(ofSize: UIFont.preferredFont(forTextStyle: .title2).pointSize, weight: .bold) return label }() @@ -85,8 +85,8 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView { private lazy var disclosureButton: UIButton = { let button = NonIntrinsicButton() - button.tintColor = UIColor.tertiaryLabel - button.setImage(AppAssets.disclosureImage, for: .normal) + button.tintColor = AppAssets.primaryAccentColor + button.setImage(AppAssets.disclosureImage(size: 14, weight: .bold), for: .normal) button.contentMode = .center button.addInteraction(UIPointerInteraction()) button.addTarget(self, action: #selector(toggleDisclosure), for: .touchUpInside) @@ -95,13 +95,13 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView { private let topSeparatorView: UIView = { let view = UIView() - view.backgroundColor = UIColor.separator + view.backgroundColor = UIColor.clear return view }() private let bottomSeparatorView: UIView = { let view = UIView() - view.backgroundColor = UIColor.separator + view.backgroundColor = UIColor.clear return view }() @@ -200,7 +200,7 @@ private extension MasterFeedTableViewSectionHeader { func addBackgroundView() { self.backgroundView = UIView(frame: self.bounds) - self.backgroundView?.backgroundColor = AppAssets.sectionHeaderColor + self.backgroundView?.backgroundColor = .clear } } diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeaderLayout.swift b/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeaderLayout.swift index 1421e16f0..60748bb82 100644 --- a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeaderLayout.swift +++ b/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeaderLayout.swift @@ -12,7 +12,7 @@ import RSCore struct MasterFeedTableViewSectionHeaderLayout { private static let labelMarginRight = CGFloat(integerLiteral: 8) - private static let unreadCountMarginRight = CGFloat(integerLiteral: 16) + private static let unreadCountMarginRight = CGFloat(integerLiteral: 0) private static let disclosureButtonSize = CGSize(width: 44, height: 44) private static let verticalPadding = CGFloat(integerLiteral: 11) @@ -31,7 +31,7 @@ struct MasterFeedTableViewSectionHeaderLayout { // Disclosure Button var rDisclosure = CGRect.zero rDisclosure.size = MasterFeedTableViewSectionHeaderLayout.disclosureButtonSize - rDisclosure.origin.x = bounds.origin.x + rDisclosure.origin.x = bounds.maxX - rDisclosure.size.width // Unread Count let unreadCountSize = unreadCountView.contentSize @@ -40,7 +40,7 @@ struct MasterFeedTableViewSectionHeaderLayout { var rUnread = CGRect.zero if !unreadCountIsHidden { rUnread.size = unreadCountSize - rUnread.origin.x = bounds.maxX - (MasterFeedTableViewSectionHeaderLayout.unreadCountMarginRight + unreadCountSize.width) + rUnread.origin.x = bounds.maxX - (MasterFeedTableViewSectionHeaderLayout.unreadCountMarginRight + unreadCountSize.width + rDisclosure.size.width) } // Max Unread Count @@ -50,7 +50,7 @@ struct MasterFeedTableViewSectionHeaderLayout { let maxUnreadCountSize = maxUnreadCountView.contentSize // Title - let rLabelx = insets.left + MasterFeedTableViewSectionHeaderLayout.disclosureButtonSize.width + let rLabelx = 15.0 let rLabely = UIFontMetrics.default.scaledValue(for: MasterFeedTableViewSectionHeaderLayout.verticalPadding) var labelWidth = CGFloat.zero diff --git a/iOS/UIKit Extensions/InteractiveNavigationController.swift b/iOS/UIKit Extensions/InteractiveNavigationController.swift index eb939fc3d..1b7ddda05 100644 --- a/iOS/UIKit Extensions/InteractiveNavigationController.swift +++ b/iOS/UIKit Extensions/InteractiveNavigationController.swift @@ -47,12 +47,27 @@ private extension InteractiveNavigationController { isToolbarHidden = false let navigationStandardAppearance = UINavigationBarAppearance() - navigationStandardAppearance.titleTextAttributes = [.foregroundColor: UIColor.label] - navigationStandardAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor.label] + navigationStandardAppearance.titleTextAttributes = [ + .foregroundColor: UIColor.label, + .font: UIFont.systemFont(ofSize: UIFont.preferredFont(forTextStyle: .body).pointSize, weight: .heavy) + ] + navigationStandardAppearance.largeTitleTextAttributes = [ + .foregroundColor: UIColor.green, + .font: UIFont.systemFont(ofSize: UIFont.preferredFont(forTextStyle: .largeTitle).pointSize - 3, weight: .black) + ] navigationBar.standardAppearance = navigationStandardAppearance let scrollEdgeStandardAppearance = UINavigationBarAppearance() scrollEdgeStandardAppearance.backgroundColor = .systemBackground + scrollEdgeStandardAppearance.shadowColor = nil + scrollEdgeStandardAppearance.titleTextAttributes = [ + .foregroundColor: UIColor.label, + .font: UIFont.systemFont(ofSize: UIFont.preferredFont(forTextStyle: .body).pointSize, weight: .heavy) + ] + scrollEdgeStandardAppearance.largeTitleTextAttributes = [ + .foregroundColor: UIColor.label, + .font: UIFont.systemFont(ofSize: UIFont.preferredFont(forTextStyle: .largeTitle).pointSize - 3, weight: .black) + ] navigationBar.scrollEdgeAppearance = scrollEdgeStandardAppearance navigationBar.tintColor = AppAssets.primaryAccentColor