Remove a number of instances of the word master.

This commit is contained in:
Brent Simmons 2024-11-14 20:32:12 -08:00
parent 26091d9593
commit 758f251115
31 changed files with 209 additions and 211 deletions

View File

@ -545,8 +545,8 @@
843006D42CE16406001B820C /* Add */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Add; sourceTree = "<group>"; }; 843006D42CE16406001B820C /* Add */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Add; sourceTree = "<group>"; };
843006E42CE16409001B820C /* Account */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Account; sourceTree = "<group>"; }; 843006E42CE16409001B820C /* Account */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Account; sourceTree = "<group>"; };
843006FA2CE1640C001B820C /* Article */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Article; sourceTree = "<group>"; }; 843006FA2CE1640C001B820C /* Article */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Article; sourceTree = "<group>"; };
843007182CE1640F001B820C /* MasterTimeline */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = MasterTimeline; sourceTree = "<group>"; }; 843007182CE1640F001B820C /* Timeline */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Timeline; sourceTree = "<group>"; };
843007342CE16412001B820C /* MasterFeed */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = MasterFeed; sourceTree = "<group>"; }; 843007342CE16412001B820C /* Feed */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Feed; sourceTree = "<group>"; };
845E30622CE1639500770277 /* Resources */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (845E306D2CE1639500770277 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 845E306E2CE1639500770277 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Resources; sourceTree = "<group>"; }; 845E30622CE1639500770277 /* Resources */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (845E306D2CE1639500770277 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 845E306E2CE1639500770277 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Resources; sourceTree = "<group>"; };
84BAE0AA2CE1C4D500402E69 /* Mac */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (84BAE1402CE1C4D500402E69 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84BAE1412CE1C4D500402E69 /* PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet */, 84BAE1422CE1C4D500402E69 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84BAE1432CE1C4D500402E69 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Mac; sourceTree = "<group>"; }; 84BAE0AA2CE1C4D500402E69 /* Mac */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (84BAE1402CE1C4D500402E69 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84BAE1412CE1C4D500402E69 /* PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet */, 84BAE1422CE1C4D500402E69 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 84BAE1432CE1C4D500402E69 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Mac; sourceTree = "<group>"; };
84BAE17F2CE1C7F800402E69 /* IntentsExtension */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (84BAE1812CE1C7F800402E69 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = IntentsExtension; sourceTree = "<group>"; }; 84BAE17F2CE1C7F800402E69 /* IntentsExtension */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (84BAE1812CE1C7F800402E69 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = IntentsExtension; sourceTree = "<group>"; };
@ -730,8 +730,8 @@
51BB7C262335A8E5008E8144 /* ArticleActivityItemSource.swift */, 51BB7C262335A8E5008E8144 /* ArticleActivityItemSource.swift */,
C5A6ED5123C9AF4300AB6BE2 /* TitleActivityItemSource.swift */, C5A6ED5123C9AF4300AB6BE2 /* TitleActivityItemSource.swift */,
51B62E67233186730085F949 /* IconView.swift */, 51B62E67233186730085F949 /* IconView.swift */,
843007342CE16412001B820C /* MasterFeed */, 843007342CE16412001B820C /* Feed */,
843007182CE1640F001B820C /* MasterTimeline */, 843007182CE1640F001B820C /* Timeline */,
843006FA2CE1640C001B820C /* Article */, 843006FA2CE1640C001B820C /* Article */,
843006E42CE16409001B820C /* Account */, 843006E42CE16409001B820C /* Account */,
843006D42CE16406001B820C /* Add */, 843006D42CE16406001B820C /* Add */,
@ -907,8 +907,8 @@
843006D42CE16406001B820C /* Add */, 843006D42CE16406001B820C /* Add */,
843006E42CE16409001B820C /* Account */, 843006E42CE16409001B820C /* Account */,
843006FA2CE1640C001B820C /* Article */, 843006FA2CE1640C001B820C /* Article */,
843007182CE1640F001B820C /* MasterTimeline */, 843007182CE1640F001B820C /* Timeline */,
843007342CE16412001B820C /* MasterFeed */, 843007342CE16412001B820C /* Feed */,
845E30622CE1639500770277 /* Resources */, 845E30622CE1639500770277 /* Resources */,
84C1EC192CDFE49100C7456A /* Shared */, 84C1EC192CDFE49100C7456A /* Shared */,
); );

View File

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/>
@ -18,7 +17,7 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="h1Q-FS-jlg" customClass="ArticleSearchBar" customModule="NetNewsWire" customModuleProvider="target"> <view hidden="YES" contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="h1Q-FS-jlg" customClass="ArticleSearchBar" customModule="NetNewsWire" customModuleProvider="target">
<rect key="frame" x="0.0" y="777" width="414" height="36"/> <rect key="frame" x="0.0" y="777" width="414" height="36"/>
<color key="backgroundColor" name="barBackgroundColor"/> <color key="backgroundColor" name="barBackgroundColor"/>
</view> </view>
@ -113,14 +112,14 @@
<!--Timeline--> <!--Timeline-->
<scene sceneID="fag-XH-avP"> <scene sceneID="fag-XH-avP">
<objects> <objects>
<tableViewController storyboardIdentifier="MasterTimelineViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" clearsSelectionOnViewWillAppear="NO" id="Kyk-vK-QRX" customClass="MasterTimelineViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController"> <tableViewController storyboardIdentifier="TimelineViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" clearsSelectionOnViewWillAppear="NO" id="Kyk-vK-QRX" customClass="TimelineViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="onDrag" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="mtv-Ik-FoJ"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="onDrag" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="mtv-Ik-FoJ">
<rect key="frame" x="0.0" y="0.0" width="414" height="725"/> <rect key="frame" x="0.0" y="0.0" width="414" height="721"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<prototypes> <prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" rowHeight="208" id="T5d-L4-OKG" customClass="MasterTimelineTableViewCell" customModule="NetNewsWire" customModuleProvider="target"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" rowHeight="208" id="T5d-L4-OKG" customClass="TimelineTableViewCell">
<rect key="frame" x="0.0" y="28" width="414" height="208"/> <rect key="frame" x="0.0" y="50" width="414" height="208"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="T5d-L4-OKG" id="QKC-jN-XDy"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="T5d-L4-OKG" id="QKC-jN-XDy">
<rect key="frame" x="0.0" y="0.0" width="414" height="208"/> <rect key="frame" x="0.0" y="0.0" width="414" height="208"/>
@ -159,13 +158,13 @@
<!--Feeds--> <!--Feeds-->
<scene sceneID="smW-Zh-WAh"> <scene sceneID="smW-Zh-WAh">
<objects> <objects>
<tableViewController storyboardIdentifier="MasterFeedViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" clearsSelectionOnViewWillAppear="NO" id="7bK-jq-Zjz" customClass="MasterFeedViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController"> <tableViewController storyboardIdentifier="FeedViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" clearsSelectionOnViewWillAppear="NO" id="7bK-jq-Zjz" customClass="FeedViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController">
<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"> <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"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<prototypes> <prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" id="zNG-5C-pQm" customClass="MasterFeedTableViewCell" customModule="NetNewsWire" customModuleProvider="target"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" id="zNG-5C-pQm" customClass="FeedTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
<rect key="frame" x="0.0" y="55.5" width="414" height="43.5"/> <rect key="frame" x="0.0" y="55.5" width="414" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="zNG-5C-pQm" id="5gB-Jr-qIo"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="zNG-5C-pQm" id="5gB-Jr-qIo">
@ -247,7 +246,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RmY-a3-hUg"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RmY-a3-hUg">
<rect key="frame" x="362" y="44" width="44" height="44"/> <rect key="frame" x="362" y="48" width="44" height="44"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="44" id="56o-Zr-T0w"/> <constraint firstAttribute="width" constant="44" id="56o-Zr-T0w"/>
<constraint firstAttribute="height" constant="44" id="lBg-Wy-k9P"/> <constraint firstAttribute="height" constant="44" id="lBg-Wy-k9P"/>
@ -259,7 +258,7 @@
</connections> </connections>
</button> </button>
<button opaque="NO" clipsSubviews="YES" contentMode="center" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cXR-ll-xBx"> <button opaque="NO" clipsSubviews="YES" contentMode="center" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cXR-ll-xBx">
<rect key="frame" x="8" y="44" width="44" height="44"/> <rect key="frame" x="8" y="48" width="44" height="44"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="44" id="6kc-Gw-KbZ"/> <constraint firstAttribute="height" constant="44" id="6kc-Gw-KbZ"/>
<constraint firstAttribute="width" constant="44" id="cBq-gs-WzN"/> <constraint firstAttribute="width" constant="44" id="cBq-gs-WzN"/>
@ -329,7 +328,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Article Title" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iFp-rn-HhQ"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Article Title" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iFp-rn-HhQ">
<rect key="frame" x="20" y="74.5" width="135.5" height="33.5"/> <rect key="frame" x="20" y="74.5" width="136" height="33.5"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/> <fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
@ -397,16 +396,16 @@
</scene> </scene>
</scenes> </scenes>
<resources> <resources>
<image name="chevron.down" catalog="system" width="128" height="72"/> <image name="chevron.down" catalog="system" width="128" height="70"/>
<image name="chevron.down.circle" catalog="system" width="128" height="121"/> <image name="chevron.down.circle" catalog="system" width="128" height="123"/>
<image name="chevron.up" catalog="system" width="128" height="72"/> <image name="chevron.up" catalog="system" width="128" height="70"/>
<image name="circle" catalog="system" width="128" height="121"/> <image name="circle" catalog="system" width="128" height="123"/>
<image name="gear" catalog="system" width="128" height="119"/> <image name="gear" catalog="system" width="128" height="122"/>
<image name="line.3.horizontal.decrease.circle" catalog="system" width="128" height="121"/> <image name="line.3.horizontal.decrease.circle" catalog="system" width="128" height="123"/>
<image name="markAllAsRead" width="13" height="20"/> <image name="markAllAsRead" width="13" height="20"/>
<image name="multiply.circle.fill" catalog="system" width="128" height="121"/> <image name="multiply.circle.fill" catalog="system" width="128" height="123"/>
<image name="square.and.arrow.up" catalog="system" width="115" height="128"/> <image name="square.and.arrow.up" catalog="system" width="110" height="128"/>
<image name="square.and.arrow.up.fill" catalog="system" width="115" height="128"/> <image name="square.and.arrow.up.fill" catalog="system" width="117" height="128"/>
<image name="star" catalog="system" width="128" height="116"/> <image name="star" catalog="system" width="128" height="116"/>
<namedColor name="barBackgroundColor"> <namedColor name="barBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

View File

@ -1,5 +1,5 @@
// //
// MasterFeedRowIdentifier.swift // FeedRowIdentifier.swift
// NetNewsWire-iOS // NetNewsWire-iOS
// //
// Created by Maurice Parker on 10/20/21. // Created by Maurice Parker on 10/20/21.
@ -8,7 +8,7 @@
import Foundation import Foundation
class MasterFeedRowIdentifier: NSObject, NSCopying { class FeedRowIdentifier: NSObject, NSCopying {
var indexPath: IndexPath var indexPath: IndexPath

View File

@ -1,5 +1,5 @@
// //
// MasterTableViewCell.swift // FeedTableViewCell.swift
// NetNewsWire // NetNewsWire
// //
// Created by Brent Simmons on 8/1/15. // Created by Brent Simmons on 8/1/15.
@ -11,13 +11,13 @@ import RSCore
import Account import Account
import RSTree import RSTree
protocol MasterFeedTableViewCellDelegate: AnyObject { protocol FeedTableViewCellDelegate: AnyObject {
func masterFeedTableViewCellDisclosureDidToggle(_ sender: MasterFeedTableViewCell, expanding: Bool) func feedTableViewCellDisclosureDidToggle(_ sender: FeedTableViewCell, expanding: Bool)
} }
class MasterFeedTableViewCell : VibrantTableViewCell { class FeedTableViewCell : VibrantTableViewCell {
weak var delegate: MasterFeedTableViewCellDelegate? weak var delegate: FeedTableViewCellDelegate?
override var accessibilityLabel: String? { override var accessibilityLabel: String? {
set {} set {}
@ -103,7 +103,7 @@ class MasterFeedTableViewCell : VibrantTableViewCell {
private var isDisclosureExpanded = false private var isDisclosureExpanded = false
private var disclosureButton: UIButton? private var disclosureButton: UIButton?
private var unreadCountView = MasterFeedUnreadCountView(frame: CGRect.zero) private var unreadCountView = FeedUnreadCountView(frame: CGRect.zero)
private var isShowingEditControl = false private var isShowingEditControl = false
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
@ -136,20 +136,20 @@ class MasterFeedTableViewCell : VibrantTableViewCell {
} }
override func sizeThatFits(_ size: CGSize) -> CGSize { override func sizeThatFits(_ size: CGSize) -> CGSize {
let layout = MasterFeedTableViewCellLayout(cellWidth: bounds.size.width, insets: safeAreaInsets, label: titleView, unreadCountView: unreadCountView, showingEditingControl: isShowingEditControl, indent: indentationLevel == 1, shouldShowDisclosure: isDisclosureAvailable) let layout = FeedTableViewCellLayout(cellWidth: bounds.size.width, insets: safeAreaInsets, label: titleView, unreadCountView: unreadCountView, showingEditingControl: isShowingEditControl, indent: indentationLevel == 1, shouldShowDisclosure: isDisclosureAvailable)
return CGSize(width: bounds.width, height: layout.height) return CGSize(width: bounds.width, height: layout.height)
} }
override func layoutSubviews() { override func layoutSubviews() {
super.layoutSubviews() super.layoutSubviews()
let layout = MasterFeedTableViewCellLayout(cellWidth: bounds.size.width, insets: safeAreaInsets, label: titleView, unreadCountView: unreadCountView, showingEditingControl: isShowingEditControl, indent: indentationLevel == 1, shouldShowDisclosure: isDisclosureAvailable) let layout = FeedTableViewCellLayout(cellWidth: bounds.size.width, insets: safeAreaInsets, label: titleView, unreadCountView: unreadCountView, showingEditingControl: isShowingEditControl, indent: indentationLevel == 1, shouldShowDisclosure: isDisclosureAvailable)
layoutWith(layout) layoutWith(layout)
} }
@objc func buttonPressed(_ sender: UIButton) { @objc func buttonPressed(_ sender: UIButton) {
if isDisclosureAvailable { if isDisclosureAvailable {
setDisclosure(isExpanded: !isDisclosureExpanded, animated: true) setDisclosure(isExpanded: !isDisclosureExpanded, animated: true)
delegate?.masterFeedTableViewCellDisclosureDidToggle(self, expanding: isDisclosureExpanded) delegate?.feedTableViewCellDisclosureDidToggle(self, expanding: isDisclosureExpanded)
} }
} }
@ -180,7 +180,7 @@ class MasterFeedTableViewCell : VibrantTableViewCell {
} }
private extension MasterFeedTableViewCell { private extension FeedTableViewCell {
func commonInit() { func commonInit() {
addSubviewAtInit(unreadCountView) addSubviewAtInit(unreadCountView)
@ -206,7 +206,7 @@ private extension MasterFeedTableViewCell {
view.translatesAutoresizingMaskIntoConstraints = false view.translatesAutoresizingMaskIntoConstraints = false
} }
func layoutWith(_ layout: MasterFeedTableViewCellLayout) { func layoutWith(_ layout: FeedTableViewCellLayout) {
iconView.setFrameIfNotEqual(layout.faviconRect) iconView.setFrameIfNotEqual(layout.faviconRect)
titleView.setFrameIfNotEqual(layout.titleRect) titleView.setFrameIfNotEqual(layout.titleRect)
unreadCountView.setFrameIfNotEqual(layout.unreadCountRect) unreadCountView.setFrameIfNotEqual(layout.unreadCountRect)

View File

@ -1,5 +1,5 @@
// //
// MasterTableViewCellLayout.swift // TableViewCellLayout.swift
// NetNewsWire // NetNewsWire
// //
// Created by Brent Simmons on 11/24/17. // Created by Brent Simmons on 11/24/17.
@ -9,7 +9,7 @@
import UIKit import UIKit
import RSCore import RSCore
struct MasterFeedTableViewCellLayout { struct FeedTableViewCellLayout {
private static let indentWidth = CGFloat(integerLiteral: 42) private static let indentWidth = CGFloat(integerLiteral: 42)
private static let editingControlIndent = CGFloat(integerLiteral: 40) private static let editingControlIndent = CGFloat(integerLiteral: 40)
@ -32,18 +32,18 @@ struct MasterFeedTableViewCellLayout {
let height: CGFloat let height: CGFloat
init(cellWidth: CGFloat, insets: UIEdgeInsets, label: UILabel, unreadCountView: MasterFeedUnreadCountView, showingEditingControl: Bool, indent: Bool, shouldShowDisclosure: Bool) { init(cellWidth: CGFloat, insets: UIEdgeInsets, label: UILabel, unreadCountView: FeedUnreadCountView, showingEditingControl: Bool, indent: Bool, shouldShowDisclosure: Bool) {
var initialIndent = insets.left var initialIndent = insets.left
if indent { if indent {
initialIndent += MasterFeedTableViewCellLayout.indentWidth initialIndent += FeedTableViewCellLayout.indentWidth
} }
let bounds = CGRect(x: initialIndent, y: 0.0, width: floor(cellWidth - initialIndent - insets.right), height: 0.0) let bounds = CGRect(x: initialIndent, y: 0.0, width: floor(cellWidth - initialIndent - insets.right), height: 0.0)
// Disclosure Button // Disclosure Button
var rDisclosure = CGRect.zero var rDisclosure = CGRect.zero
if shouldShowDisclosure { if shouldShowDisclosure {
rDisclosure.size = MasterFeedTableViewCellLayout.disclosureButtonSize rDisclosure.size = FeedTableViewCellLayout.disclosureButtonSize
rDisclosure.origin.x = bounds.origin.x rDisclosure.origin.x = bounds.origin.x
} }
@ -51,10 +51,10 @@ struct MasterFeedTableViewCellLayout {
var rFavicon = CGRect.zero var rFavicon = CGRect.zero
if !shouldShowDisclosure { if !shouldShowDisclosure {
let x = bounds.origin.x let x = bounds.origin.x
let y = UIFontMetrics.default.scaledValue(for: MasterFeedTableViewCellLayout.verticalPadding) + let y = UIFontMetrics.default.scaledValue(for: FeedTableViewCellLayout.verticalPadding) +
label.font.lineHeight / 2.0 - label.font.lineHeight / 2.0 -
MasterFeedTableViewCellLayout.imageSize.height / 2.0 FeedTableViewCellLayout.imageSize.height / 2.0
rFavicon = CGRect(x: x, y: y, width: MasterFeedTableViewCellLayout.imageSize.width, height: MasterFeedTableViewCellLayout.imageSize.height) rFavicon = CGRect(x: x, y: y, width: FeedTableViewCellLayout.imageSize.width, height: FeedTableViewCellLayout.imageSize.height)
} }
// Unread Count // Unread Count
@ -64,21 +64,21 @@ struct MasterFeedTableViewCellLayout {
var rUnread = CGRect.zero var rUnread = CGRect.zero
if !unreadCountIsHidden { if !unreadCountIsHidden {
rUnread.size = unreadCountSize rUnread.size = unreadCountSize
rUnread.origin.x = bounds.maxX - (MasterFeedTableViewCellLayout.unreadCountMarginRight + unreadCountSize.width) rUnread.origin.x = bounds.maxX - (FeedTableViewCellLayout.unreadCountMarginRight + unreadCountSize.width)
} }
// Title // Title
var rLabelx = insets.left + MasterFeedTableViewCellLayout.disclosureButtonSize.width var rLabelx = insets.left + FeedTableViewCellLayout.disclosureButtonSize.width
if !shouldShowDisclosure { if !shouldShowDisclosure {
rLabelx = rLabelx + MasterFeedTableViewCellLayout.imageSize.width + MasterFeedTableViewCellLayout.imageMarginRight rLabelx = rLabelx + FeedTableViewCellLayout.imageSize.width + FeedTableViewCellLayout.imageMarginRight
} }
let rLabely = UIFontMetrics.default.scaledValue(for: MasterFeedTableViewCellLayout.verticalPadding) let rLabely = UIFontMetrics.default.scaledValue(for: FeedTableViewCellLayout.verticalPadding)
var labelWidth = CGFloat.zero var labelWidth = CGFloat.zero
if !unreadCountIsHidden { if !unreadCountIsHidden {
labelWidth = cellWidth - (rLabelx + MasterFeedTableViewCellLayout.labelMarginRight + (cellWidth - rUnread.minX)) labelWidth = cellWidth - (rLabelx + FeedTableViewCellLayout.labelMarginRight + (cellWidth - rUnread.minX))
} else { } else {
labelWidth = cellWidth - (rLabelx + MasterFeedTableViewCellLayout.labelMarginRight) labelWidth = cellWidth - (rLabelx + FeedTableViewCellLayout.labelMarginRight)
} }
let labelSizeInfo = MultilineUILabelSizer.size(for: label.text ?? "", font: label.font, numberOfLines: 0, width: Int(floor(labelWidth))) let labelSizeInfo = MultilineUILabelSizer.size(for: label.text ?? "", font: label.font, numberOfLines: 0, width: Int(floor(labelWidth)))
@ -87,44 +87,44 @@ struct MasterFeedTableViewCellLayout {
// We do this because we don't want the row height to change when the editing controls are brought out. We will // We do this because we don't want the row height to change when the editing controls are brought out. We will
// handle the missing space, but removing it from the label and truncating. // handle the missing space, but removing it from the label and truncating.
if showingEditingControl { if showingEditingControl {
rDisclosure.origin.x += MasterFeedTableViewCellLayout.editingControlIndent rDisclosure.origin.x += FeedTableViewCellLayout.editingControlIndent
rFavicon.origin.x += MasterFeedTableViewCellLayout.editingControlIndent rFavicon.origin.x += FeedTableViewCellLayout.editingControlIndent
rLabelx += MasterFeedTableViewCellLayout.editingControlIndent rLabelx += FeedTableViewCellLayout.editingControlIndent
if !unreadCountIsHidden { if !unreadCountIsHidden {
rUnread.origin.x -= MasterFeedTableViewCellLayout.editingControlIndent rUnread.origin.x -= FeedTableViewCellLayout.editingControlIndent
labelWidth = cellWidth - (rLabelx + MasterFeedTableViewCellLayout.labelMarginRight + (cellWidth - rUnread.minX)) labelWidth = cellWidth - (rLabelx + FeedTableViewCellLayout.labelMarginRight + (cellWidth - rUnread.minX))
} else { } else {
labelWidth = cellWidth - (rLabelx + MasterFeedTableViewCellLayout.labelMarginRight + MasterFeedTableViewCellLayout.editingControlIndent) labelWidth = cellWidth - (rLabelx + FeedTableViewCellLayout.labelMarginRight + FeedTableViewCellLayout.editingControlIndent)
} }
} }
var rLabel = CGRect(x: rLabelx, y: rLabely, width: labelWidth, height: labelSizeInfo.size.height) var rLabel = CGRect(x: rLabelx, y: rLabely, width: labelWidth, height: labelSizeInfo.size.height)
// Determine cell height // Determine cell height
let paddedLabelHeight = rLabel.maxY + UIFontMetrics.default.scaledValue(for: MasterFeedTableViewCellLayout.verticalPadding) let paddedLabelHeight = rLabel.maxY + UIFontMetrics.default.scaledValue(for: FeedTableViewCellLayout.verticalPadding)
let maxGraphicsHeight = [rFavicon, rUnread, rDisclosure].maxY() let maxGraphicsHeight = [rFavicon, rUnread, rDisclosure].maxY()
var cellHeight = max(paddedLabelHeight, maxGraphicsHeight) var cellHeight = max(paddedLabelHeight, maxGraphicsHeight)
if cellHeight < MasterFeedTableViewCellLayout.minRowHeight { if cellHeight < FeedTableViewCellLayout.minRowHeight {
cellHeight = MasterFeedTableViewCellLayout.minRowHeight cellHeight = FeedTableViewCellLayout.minRowHeight
} }
// Center in Cell // Center in Cell
let newBounds = CGRect(x: bounds.origin.x, y: bounds.origin.y, width: bounds.width, height: cellHeight) let newBounds = CGRect(x: bounds.origin.x, y: bounds.origin.y, width: bounds.width, height: cellHeight)
if !unreadCountIsHidden { if !unreadCountIsHidden {
rUnread = MasterFeedTableViewCellLayout.centerVertically(rUnread, newBounds) rUnread = FeedTableViewCellLayout.centerVertically(rUnread, newBounds)
} }
if shouldShowDisclosure { if shouldShowDisclosure {
rDisclosure = MasterFeedTableViewCellLayout.centerVertically(rDisclosure, newBounds) rDisclosure = FeedTableViewCellLayout.centerVertically(rDisclosure, newBounds)
} }
// Small fonts and the Favicon need centered if we hit the minimum row height // Small fonts and the Favicon need centered if we hit the minimum row height
if cellHeight == MasterFeedTableViewCellLayout.minRowHeight { if cellHeight == FeedTableViewCellLayout.minRowHeight {
rLabel = MasterFeedTableViewCellLayout.centerVertically(rLabel, newBounds) rLabel = FeedTableViewCellLayout.centerVertically(rLabel, newBounds)
rFavicon = MasterFeedTableViewCellLayout.centerVertically(rFavicon, newBounds) rFavicon = FeedTableViewCellLayout.centerVertically(rFavicon, newBounds)
} }
// Separator Insets // Separator Insets
let separatorInset = MasterFeedTableViewCellLayout.disclosureButtonSize.width let separatorInset = FeedTableViewCellLayout.disclosureButtonSize.width
separatorRect = CGRect(x: separatorInset, y: cellHeight - 0.5, width: cellWidth - separatorInset, height: 0.5) separatorRect = CGRect(x: separatorInset, y: cellHeight - 0.5, width: cellWidth - separatorInset, height: 0.5)
// Assign the properties // Assign the properties

View File

@ -1,5 +1,5 @@
// //
// MasterTableViewSectionHeader.swift // TableViewSectionHeader.swift
// NetNewsWire // NetNewsWire
// //
// Created by Maurice Parker on 4/18/19. // Created by Maurice Parker on 4/18/19.
@ -8,13 +8,13 @@
import UIKit import UIKit
protocol MasterFeedTableViewSectionHeaderDelegate { protocol FeedTableViewSectionHeaderDelegate {
func masterFeedTableViewSectionHeaderDisclosureDidToggle(_ sender: MasterFeedTableViewSectionHeader) func feedTableViewSectionHeaderDisclosureDidToggle(_ sender: FeedTableViewSectionHeader)
} }
class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView { class FeedTableViewSectionHeader: UITableViewHeaderFooterView {
var delegate: MasterFeedTableViewSectionHeaderDelegate? var delegate: FeedTableViewSectionHeaderDelegate?
override var accessibilityLabel: String? { override var accessibilityLabel: String? {
set {} set {}
@ -81,7 +81,7 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView {
return label return label
}() }()
private let unreadCountView = MasterFeedUnreadCountView(frame: CGRect.zero) private let unreadCountView = FeedUnreadCountView(frame: CGRect.zero)
private lazy var disclosureButton: UIButton = { private lazy var disclosureButton: UIButton = {
let button = NonIntrinsicButton() let button = NonIntrinsicButton()
@ -116,14 +116,14 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView {
} }
override func sizeThatFits(_ size: CGSize) -> CGSize { override func sizeThatFits(_ size: CGSize) -> CGSize {
let layout = MasterFeedTableViewSectionHeaderLayout(cellWidth: size.width, insets: safeAreaInsets, label: titleView, unreadCountView: unreadCountView) let layout = FeedTableViewSectionHeaderLayout(cellWidth: size.width, insets: safeAreaInsets, label: titleView, unreadCountView: unreadCountView)
return CGSize(width: bounds.width, height: layout.height) return CGSize(width: bounds.width, height: layout.height)
} }
override func layoutSubviews() { override func layoutSubviews() {
super.layoutSubviews() super.layoutSubviews()
let layout = MasterFeedTableViewSectionHeaderLayout(cellWidth: contentView.bounds.size.width, let layout = FeedTableViewSectionHeaderLayout(cellWidth: contentView.bounds.size.width,
insets: contentView.safeAreaInsets, insets: contentView.safeAreaInsets,
label: titleView, label: titleView,
unreadCountView: unreadCountView) unreadCountView: unreadCountView)
@ -132,10 +132,10 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView {
} }
private extension MasterFeedTableViewSectionHeader { private extension FeedTableViewSectionHeader {
@objc func toggleDisclosure() { @objc func toggleDisclosure() {
delegate?.masterFeedTableViewSectionHeaderDisclosureDidToggle(self) delegate?.feedTableViewSectionHeaderDisclosureDidToggle(self)
} }
func commonInit() { func commonInit() {
@ -187,7 +187,7 @@ private extension MasterFeedTableViewSectionHeader {
view.translatesAutoresizingMaskIntoConstraints = false view.translatesAutoresizingMaskIntoConstraints = false
} }
func layoutWith(_ layout: MasterFeedTableViewSectionHeaderLayout) { func layoutWith(_ layout: FeedTableViewSectionHeaderLayout) {
titleView.setFrameIfNotEqual(layout.titleRect) titleView.setFrameIfNotEqual(layout.titleRect)
unreadCountView.setFrameIfNotEqual(layout.unreadCountRect) unreadCountView.setFrameIfNotEqual(layout.unreadCountRect)
disclosureButton.setFrameIfNotEqual(layout.disclosureButtonRect) disclosureButton.setFrameIfNotEqual(layout.disclosureButtonRect)

View File

@ -1,5 +1,5 @@
// //
// MasterFeedTableViewSectionHeaderLayout.swift // FeedTableViewSectionHeaderLayout.swift
// NetNewsWire-iOS // NetNewsWire-iOS
// //
// Created by Maurice Parker on 11/5/19. // Created by Maurice Parker on 11/5/19.
@ -9,7 +9,7 @@
import UIKit import UIKit
import RSCore import RSCore
struct MasterFeedTableViewSectionHeaderLayout { struct FeedTableViewSectionHeaderLayout {
private static let labelMarginRight = CGFloat(integerLiteral: 8) private static let labelMarginRight = CGFloat(integerLiteral: 8)
private static let unreadCountMarginRight = CGFloat(integerLiteral: 16) private static let unreadCountMarginRight = CGFloat(integerLiteral: 16)
@ -24,13 +24,13 @@ struct MasterFeedTableViewSectionHeaderLayout {
let height: CGFloat let height: CGFloat
init(cellWidth: CGFloat, insets: UIEdgeInsets, label: UILabel, unreadCountView: MasterFeedUnreadCountView) { init(cellWidth: CGFloat, insets: UIEdgeInsets, label: UILabel, unreadCountView: FeedUnreadCountView) {
let bounds = CGRect(x: insets.left, y: 0.0, width: floor(cellWidth - insets.right), height: 0.0) let bounds = CGRect(x: insets.left, y: 0.0, width: floor(cellWidth - insets.right), height: 0.0)
// Disclosure Button // Disclosure Button
var rDisclosure = CGRect.zero var rDisclosure = CGRect.zero
rDisclosure.size = MasterFeedTableViewSectionHeaderLayout.disclosureButtonSize rDisclosure.size = FeedTableViewSectionHeaderLayout.disclosureButtonSize
rDisclosure.origin.x = bounds.origin.x rDisclosure.origin.x = bounds.origin.x
// Unread Count // Unread Count
@ -40,43 +40,43 @@ struct MasterFeedTableViewSectionHeaderLayout {
var rUnread = CGRect.zero var rUnread = CGRect.zero
if !unreadCountIsHidden { if !unreadCountIsHidden {
rUnread.size = unreadCountSize rUnread.size = unreadCountSize
rUnread.origin.x = bounds.maxX - (MasterFeedTableViewSectionHeaderLayout.unreadCountMarginRight + unreadCountSize.width) rUnread.origin.x = bounds.maxX - (FeedTableViewSectionHeaderLayout.unreadCountMarginRight + unreadCountSize.width)
} }
// Max Unread Count // Max Unread Count
// We can't reload Section Headers so we don't let the title extend into the (probably) worse case Unread Count area. // We can't reload Section Headers so we don't let the title extend into the (probably) worse case Unread Count area.
let maxUnreadCountView = MasterFeedUnreadCountView(frame: CGRect.zero) let maxUnreadCountView = FeedUnreadCountView(frame: CGRect.zero)
maxUnreadCountView.unreadCount = 888 maxUnreadCountView.unreadCount = 888
let maxUnreadCountSize = maxUnreadCountView.contentSize let maxUnreadCountSize = maxUnreadCountView.contentSize
// Title // Title
let rLabelx = insets.left + MasterFeedTableViewSectionHeaderLayout.disclosureButtonSize.width let rLabelx = insets.left + FeedTableViewSectionHeaderLayout.disclosureButtonSize.width
let rLabely = UIFontMetrics.default.scaledValue(for: MasterFeedTableViewSectionHeaderLayout.verticalPadding) let rLabely = UIFontMetrics.default.scaledValue(for: FeedTableViewSectionHeaderLayout.verticalPadding)
var labelWidth = CGFloat.zero var labelWidth = CGFloat.zero
labelWidth = cellWidth - (rLabelx + MasterFeedTableViewSectionHeaderLayout.labelMarginRight + maxUnreadCountSize.width + MasterFeedTableViewSectionHeaderLayout.unreadCountMarginRight) labelWidth = cellWidth - (rLabelx + FeedTableViewSectionHeaderLayout.labelMarginRight + maxUnreadCountSize.width + FeedTableViewSectionHeaderLayout.unreadCountMarginRight)
let labelSizeInfo = MultilineUILabelSizer.size(for: label.text ?? "", font: label.font, numberOfLines: 0, width: Int(floor(labelWidth))) let labelSizeInfo = MultilineUILabelSizer.size(for: label.text ?? "", font: label.font, numberOfLines: 0, width: Int(floor(labelWidth)))
var rLabel = CGRect(x: rLabelx, y: rLabely, width: labelWidth, height: labelSizeInfo.size.height) var rLabel = CGRect(x: rLabelx, y: rLabely, width: labelWidth, height: labelSizeInfo.size.height)
// Determine cell height // Determine cell height
let paddedLabelHeight = rLabel.maxY + UIFontMetrics.default.scaledValue(for: MasterFeedTableViewSectionHeaderLayout.verticalPadding) let paddedLabelHeight = rLabel.maxY + UIFontMetrics.default.scaledValue(for: FeedTableViewSectionHeaderLayout.verticalPadding)
let maxGraphicsHeight = [rUnread, rDisclosure].maxY() let maxGraphicsHeight = [rUnread, rDisclosure].maxY()
var cellHeight = max(paddedLabelHeight, maxGraphicsHeight) var cellHeight = max(paddedLabelHeight, maxGraphicsHeight)
if cellHeight < MasterFeedTableViewSectionHeaderLayout.minRowHeight { if cellHeight < FeedTableViewSectionHeaderLayout.minRowHeight {
cellHeight = MasterFeedTableViewSectionHeaderLayout.minRowHeight cellHeight = FeedTableViewSectionHeaderLayout.minRowHeight
} }
// Center in Cell // Center in Cell
let newBounds = CGRect(x: bounds.origin.x, y: bounds.origin.y, width: bounds.width, height: cellHeight) let newBounds = CGRect(x: bounds.origin.x, y: bounds.origin.y, width: bounds.width, height: cellHeight)
if !unreadCountIsHidden { if !unreadCountIsHidden {
rUnread = MasterFeedTableViewCellLayout.centerVertically(rUnread, newBounds) rUnread = FeedTableViewCellLayout.centerVertically(rUnread, newBounds)
} }
rDisclosure = MasterFeedTableViewCellLayout.centerVertically(rDisclosure, newBounds) rDisclosure = FeedTableViewCellLayout.centerVertically(rDisclosure, newBounds)
// Small fonts need centered if we hit the minimum row height // Small fonts need centered if we hit the minimum row height
if cellHeight == MasterFeedTableViewSectionHeaderLayout.minRowHeight { if cellHeight == FeedTableViewSectionHeaderLayout.minRowHeight {
rLabel = MasterFeedTableViewCellLayout.centerVertically(rLabel, newBounds) rLabel = FeedTableViewCellLayout.centerVertically(rLabel, newBounds)
} }
// Assign the properties // Assign the properties

View File

@ -1,5 +1,5 @@
// //
// MasterUnreadCountView.swift // UnreadCountView.swift
// NetNewsWire // NetNewsWire
// //
// Created by Brent Simmons on 11/22/15. // Created by Brent Simmons on 11/22/15.
@ -8,7 +8,7 @@
import UIKit import UIKit
class MasterFeedUnreadCountView : UIView { class FeedUnreadCountView : UIView {
var padding: UIEdgeInsets { var padding: UIEdgeInsets {
return UIEdgeInsets(top: 1.0, left: 9.0, bottom: 1.0, right: 9.0) return UIEdgeInsets(top: 1.0, left: 9.0, bottom: 1.0, right: 9.0)

View File

@ -1,5 +1,5 @@
// //
// MasterFeedViewController+Drag.swift // FeedViewController+Drag.swift
// NetNewsWire-iOS // NetNewsWire-iOS
// //
// Created by Maurice Parker on 11/20/19. // Created by Maurice Parker on 11/20/19.
@ -11,7 +11,7 @@ import MobileCoreServices
import Account import Account
import UniformTypeIdentifiers import UniformTypeIdentifiers
extension MasterFeedViewController: UITableViewDragDelegate { extension FeedViewController: UITableViewDragDelegate {
func tableView(_ tableView: UITableView, itemsForBeginning session: UIDragSession, at indexPath: IndexPath) -> [UIDragItem] { func tableView(_ tableView: UITableView, itemsForBeginning session: UIDragSession, at indexPath: IndexPath) -> [UIDragItem] {
guard let node = coordinator.nodeFor(indexPath), let feed = node.representedObject as? Feed else { guard let node = coordinator.nodeFor(indexPath), let feed = node.representedObject as? Feed else {

View File

@ -1,5 +1,5 @@
// //
// MasterFeedViewController+Drop.swift // FeedViewController+Drop.swift
// NetNewsWire-iOS // NetNewsWire-iOS
// //
// Created by Maurice Parker on 11/20/19. // Created by Maurice Parker on 11/20/19.
@ -11,7 +11,7 @@ import RSCore
import Account import Account
import RSTree import RSTree
extension MasterFeedViewController: UITableViewDropDelegate { extension FeedViewController: UITableViewDropDelegate {
func tableView(_ tableView: UITableView, canHandle session: UIDropSession) -> Bool { func tableView(_ tableView: UITableView, canHandle session: UIDropSession) -> Bool {
return session.localDragSession != nil return session.localDragSession != nil

View File

@ -1,5 +1,5 @@
// //
// MasterViewController.swift // FeedViewController.swift
// NetNewsWire // NetNewsWire
// //
// Created by Maurice Parker on 4/8/19. // Created by Maurice Parker on 4/8/19.
@ -13,7 +13,7 @@ import RSCore
import RSTree import RSTree
import SafariServices import SafariServices
class MasterFeedViewController: UITableViewController, UndoableCommandRunner { class FeedViewController: UITableViewController, UndoableCommandRunner {
@IBOutlet weak var filterButton: UIBarButtonItem! @IBOutlet weak var filterButton: UIBarButtonItem!
private var refreshProgressView: RefreshProgressView? private var refreshProgressView: RefreshProgressView?
@ -55,7 +55,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
frame.size.height = .leastNormalMagnitude frame.size.height = .leastNormalMagnitude
tableView.tableHeaderView = UIView(frame: frame) tableView.tableHeaderView = UIView(frame: frame)
tableView.register(MasterFeedTableViewSectionHeader.self, forHeaderFooterViewReuseIdentifier: "SectionHeader") tableView.register(FeedTableViewSectionHeader.self, forHeaderFooterViewReuseIdentifier: "SectionHeader")
tableView.dragDelegate = self tableView.dragDelegate = self
tableView.dropDelegate = self tableView.dropDelegate = self
tableView.dragInteractionEnabled = true tableView.dragInteractionEnabled = true
@ -100,7 +100,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
if let account = unreadCountProvider as? Account { if let account = unreadCountProvider as? Account {
if let node = coordinator.rootNode.childNodeRepresentingObject(account) { if let node = coordinator.rootNode.childNodeRepresentingObject(account) {
let sectionIndex = coordinator.rootNode.indexOfChild(node)! let sectionIndex = coordinator.rootNode.indexOfChild(node)!
if let headerView = tableView.headerView(forSection: sectionIndex) as? MasterFeedTableViewSectionHeader { if let headerView = tableView.headerView(forSection: sectionIndex) as? FeedTableViewSectionHeader {
headerView.unreadCount = account.unreadCount headerView.unreadCount = account.unreadCount
} }
} }
@ -115,7 +115,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
} }
guard let unreadCountNode = node, let indexPath = coordinator.indexPathFor(unreadCountNode) else { return } guard let unreadCountNode = node, let indexPath = coordinator.indexPathFor(unreadCountNode) else { return }
if let cell = tableView.cellForRow(at: indexPath) as? MasterFeedTableViewCell { if let cell = tableView.cellForRow(at: indexPath) as? FeedTableViewCell {
cell.unreadCount = unreadCountProvider.unreadCount cell.unreadCount = unreadCountProvider.unreadCount
} }
} }
@ -160,7 +160,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
} }
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! MasterFeedTableViewCell let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! FeedTableViewCell
configure(cell, indexPath) configure(cell, indexPath)
return cell return cell
} }
@ -179,7 +179,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
return 44 return 44
} }
let headerView = MasterFeedTableViewSectionHeader() let headerView = FeedTableViewSectionHeader()
headerView.name = nameProvider.nameForDisplay headerView.name = nameProvider.nameForDisplay
let size = headerView.sizeThatFits(CGSize(width: tableView.bounds.width, height: 0.0)) let size = headerView.sizeThatFits(CGSize(width: tableView.bounds.width, height: 0.0))
@ -193,7 +193,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
return nil return nil
} }
let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "SectionHeader") as! MasterFeedTableViewSectionHeader let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "SectionHeader") as! FeedTableViewSectionHeader
headerView.delegate = self headerView.delegate = self
headerView.name = nameProvider.nameForDisplay headerView.name = nameProvider.nameForDisplay
@ -330,7 +330,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
} }
override func tableView(_ tableView: UITableView, previewForHighlightingContextMenuWithConfiguration configuration: UIContextMenuConfiguration) -> UITargetedPreview? { override func tableView(_ tableView: UITableView, previewForHighlightingContextMenuWithConfiguration configuration: UIContextMenuConfiguration) -> UITargetedPreview? {
guard let identifier = configuration.identifier as? MasterFeedRowIdentifier, guard let identifier = configuration.identifier as? FeedRowIdentifier,
let cell = tableView.cellForRow(at: identifier.indexPath) else { let cell = tableView.cellForRow(at: identifier.indexPath) else {
return nil return nil
} }
@ -427,7 +427,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
} }
@objc func toggleSectionHeader(_ sender: UITapGestureRecognizer) { @objc func toggleSectionHeader(_ sender: UITapGestureRecognizer) {
guard let headerView = sender.view as? MasterFeedTableViewSectionHeader else { guard let headerView = sender.view as? FeedTableViewSectionHeader else {
return return
} }
toggle(headerView) toggle(headerView)
@ -512,7 +512,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
// MARK: API // MARK: API
func restoreSelectionIfNecessary(adjustScroll: Bool) { func restoreSelectionIfNecessary(adjustScroll: Bool) {
if let indexPath = coordinator.masterFeedIndexPathForCurrentTimeline() { if let indexPath = coordinator.feedIndexPathForCurrentTimeline() {
if adjustScroll { if adjustScroll {
tableView.selectRowAndScrollIfNotVisible(at: indexPath, animations: []) tableView.selectRowAndScrollIfNotVisible(at: indexPath, animations: [])
} else { } else {
@ -644,7 +644,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
// MARK: UIContextMenuInteractionDelegate // MARK: UIContextMenuInteractionDelegate
extension MasterFeedViewController: UIContextMenuInteractionDelegate { extension FeedViewController: UIContextMenuInteractionDelegate {
func contextMenuInteraction(_ interaction: UIContextMenuInteraction, configurationForMenuAtLocation location: CGPoint) -> UIContextMenuConfiguration? { func contextMenuInteraction(_ interaction: UIContextMenuInteraction, configurationForMenuAtLocation location: CGPoint) -> UIContextMenuConfiguration? {
guard let sectionIndex = interaction.view?.tag, guard let sectionIndex = interaction.view?.tag,
@ -680,21 +680,21 @@ extension MasterFeedViewController: UIContextMenuInteractionDelegate {
} }
} }
// MARK: MasterFeedTableViewSectionHeaderDelegate // MARK: FeedTableViewSectionHeaderDelegate
extension MasterFeedViewController: MasterFeedTableViewSectionHeaderDelegate { extension FeedViewController: FeedTableViewSectionHeaderDelegate {
func masterFeedTableViewSectionHeaderDisclosureDidToggle(_ sender: MasterFeedTableViewSectionHeader) { func feedTableViewSectionHeaderDisclosureDidToggle(_ sender: FeedTableViewSectionHeader) {
toggle(sender) toggle(sender)
} }
} }
// MARK: MasterTableViewCellDelegate // MARK: FeedTableViewCellDelegate
extension MasterFeedViewController: MasterFeedTableViewCellDelegate { extension FeedViewController: FeedTableViewCellDelegate {
func masterFeedTableViewCellDisclosureDidToggle(_ sender: MasterFeedTableViewCell, expanding: Bool) { func feedTableViewCellDisclosureDidToggle(_ sender: FeedTableViewCell, expanding: Bool) {
if expanding { if expanding {
expand(sender) expand(sender)
} else { } else {
@ -706,7 +706,7 @@ extension MasterFeedViewController: MasterFeedTableViewCellDelegate {
// MARK: Private // MARK: Private
private extension MasterFeedViewController { private extension FeedViewController {
func configureToolbar() { func configureToolbar() {
guard let refreshProgressView = Bundle.main.loadNibNamed("RefreshProgressView", owner: self, options: nil)?[0] as? RefreshProgressView else { guard let refreshProgressView = Bundle.main.loadNibNamed("RefreshProgressView", owner: self, options: nil)?[0] as? RefreshProgressView else {
@ -732,14 +732,14 @@ private extension MasterFeedViewController {
let titleLabel = NonIntrinsicLabel() let titleLabel = NonIntrinsicLabel()
titleLabel.text = "But I must explain" titleLabel.text = "But I must explain"
let unreadCountView = MasterFeedUnreadCountView() let unreadCountView = FeedUnreadCountView()
unreadCountView.unreadCount = 10 unreadCountView.unreadCount = 10
let layout = MasterFeedTableViewCellLayout(cellWidth: tableView.bounds.size.width, insets: tableView.safeAreaInsets, label: titleLabel, unreadCountView: unreadCountView, showingEditingControl: false, indent: false, shouldShowDisclosure: false) let layout = FeedTableViewCellLayout(cellWidth: tableView.bounds.size.width, insets: tableView.safeAreaInsets, label: titleLabel, unreadCountView: unreadCountView, showingEditingControl: false, indent: false, shouldShowDisclosure: false)
tableView.estimatedRowHeight = layout.height tableView.estimatedRowHeight = layout.height
} }
func configure(_ cell: MasterFeedTableViewCell, _ indexPath: IndexPath) { func configure(_ cell: FeedTableViewCell, _ indexPath: IndexPath) {
guard let node = coordinator.nodeFor(indexPath) else { return } guard let node = coordinator.nodeFor(indexPath) else { return }
cell.delegate = self cell.delegate = self
@ -772,7 +772,7 @@ private extension MasterFeedViewController {
} }
func configureIcon(_ cell: MasterFeedTableViewCell, _ indexPath: IndexPath) { func configureIcon(_ cell: FeedTableViewCell, _ indexPath: IndexPath) {
guard let node = coordinator.nodeFor(indexPath), let feed = node.representedObject as? SidebarItem, let feedID = feed.sidebarItemID else { guard let node = coordinator.nodeFor(indexPath), let feed = node.representedObject as? SidebarItem, let feedID = feed.sidebarItemID else {
return return
} }
@ -790,7 +790,7 @@ private extension MasterFeedViewController {
applyToCellsForRepresentedObject(representedObject, configure) applyToCellsForRepresentedObject(representedObject, configure)
} }
func applyToCellsForRepresentedObject(_ representedObject: AnyObject, _ completion: (MasterFeedTableViewCell, IndexPath) -> Void) { func applyToCellsForRepresentedObject(_ representedObject: AnyObject, _ completion: (FeedTableViewCell, IndexPath) -> Void) {
applyToAvailableCells { (cell, indexPath) in applyToAvailableCells { (cell, indexPath) in
if let node = coordinator.nodeFor(indexPath), if let node = coordinator.nodeFor(indexPath),
let representedFeed = representedObject as? SidebarItem, let representedFeed = representedObject as? SidebarItem,
@ -801,12 +801,12 @@ private extension MasterFeedViewController {
} }
} }
func applyToAvailableCells(_ completion: (MasterFeedTableViewCell, IndexPath) -> Void) { func applyToAvailableCells(_ completion: (FeedTableViewCell, IndexPath) -> Void) {
tableView.visibleCells.forEach { cell in tableView.visibleCells.forEach { cell in
guard let indexPath = tableView.indexPath(for: cell) else { guard let indexPath = tableView.indexPath(for: cell) else {
return return
} }
completion(cell as! MasterFeedTableViewCell, indexPath) completion(cell as! FeedTableViewCell, indexPath)
} }
} }
@ -829,7 +829,7 @@ private extension MasterFeedViewController {
return nil return nil
} }
func toggle(_ headerView: MasterFeedTableViewSectionHeader) { func toggle(_ headerView: FeedTableViewSectionHeader) {
guard let sectionNode = coordinator.rootNode.childAtIndex(headerView.tag) else { guard let sectionNode = coordinator.rootNode.childAtIndex(headerView.tag) else {
return return
} }
@ -843,14 +843,14 @@ private extension MasterFeedViewController {
} }
} }
func expand(_ cell: MasterFeedTableViewCell) { func expand(_ cell: FeedTableViewCell) {
guard let indexPath = tableView.indexPath(for: cell), let node = coordinator.nodeFor(indexPath) else { guard let indexPath = tableView.indexPath(for: cell), let node = coordinator.nodeFor(indexPath) else {
return return
} }
coordinator.expand(node) coordinator.expand(node)
} }
func collapse(_ cell: MasterFeedTableViewCell) { func collapse(_ cell: FeedTableViewCell) {
guard let indexPath = tableView.indexPath(for: cell), let node = coordinator.nodeFor(indexPath) else { guard let indexPath = tableView.indexPath(for: cell), let node = coordinator.nodeFor(indexPath) else {
return return
} }
@ -858,7 +858,7 @@ private extension MasterFeedViewController {
} }
func makeFeedContextMenu(indexPath: IndexPath, includeDeleteRename: Bool) -> UIContextMenuConfiguration { func makeFeedContextMenu(indexPath: IndexPath, includeDeleteRename: Bool) -> UIContextMenuConfiguration {
return UIContextMenuConfiguration(identifier: MasterFeedRowIdentifier(indexPath: indexPath), previewProvider: nil, actionProvider: { [ weak self] suggestedActions in return UIContextMenuConfiguration(identifier: FeedRowIdentifier(indexPath: indexPath), previewProvider: nil, actionProvider: { [ weak self] suggestedActions in
guard let self = self else { return nil } guard let self = self else { return nil }
@ -903,7 +903,7 @@ private extension MasterFeedViewController {
} }
func makeFolderContextMenu(indexPath: IndexPath) -> UIContextMenuConfiguration { func makeFolderContextMenu(indexPath: IndexPath) -> UIContextMenuConfiguration {
return UIContextMenuConfiguration(identifier: MasterFeedRowIdentifier(indexPath: indexPath), previewProvider: nil, actionProvider: { [weak self] suggestedActions in return UIContextMenuConfiguration(identifier: FeedRowIdentifier(indexPath: indexPath), previewProvider: nil, actionProvider: { [weak self] suggestedActions in
guard let self = self else { return nil } guard let self = self else { return nil }
@ -930,7 +930,7 @@ private extension MasterFeedViewController {
return nil return nil
} }
return UIContextMenuConfiguration(identifier: MasterFeedRowIdentifier(indexPath: indexPath), previewProvider: nil, actionProvider: { suggestedActions in return UIContextMenuConfiguration(identifier: FeedRowIdentifier(indexPath: indexPath), previewProvider: nil, actionProvider: { suggestedActions in
return UIMenu(title: "", children: [markAllAction]) return UIMenu(title: "", children: [markAllAction])
}) })
} }
@ -1246,7 +1246,7 @@ private extension MasterFeedViewController {
} }
extension MasterFeedViewController: UIGestureRecognizerDelegate { extension FeedViewController: UIGestureRecognizerDelegate {
func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
guard let gestureRecognizer = gestureRecognizer as? UIPanGestureRecognizer else { guard let gestureRecognizer = gestureRecognizer as? UIPanGestureRecognizer else {
return false return false

View File

@ -60,8 +60,8 @@ class SceneCoordinator: NSObject, UndoableCommandRunner {
private var rootSplitViewController: RootSplitViewController! private var rootSplitViewController: RootSplitViewController!
private var navigationController: UINavigationController! private var navigationController: UINavigationController!
private var feedViewController: MasterFeedViewController! private var feedViewController: FeedViewController!
private var timelineViewController: MasterTimelineViewController? private var timelineViewController: TimelineViewController?
private var subSplitViewController: UISplitViewController? private var subSplitViewController: UISplitViewController?
private var articleViewController: ArticleViewController? { private var articleViewController: ArticleViewController? {
@ -339,7 +339,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner {
navigationController = (rootSplitViewController.viewControllers.first as! UINavigationController) navigationController = (rootSplitViewController.viewControllers.first as! UINavigationController)
navigationController.delegate = self navigationController.delegate = self
feedViewController = UIStoryboard.main.instantiateController(ofType: MasterFeedViewController.self) feedViewController = UIStoryboard.main.instantiateController(ofType: FeedViewController.self)
feedViewController.coordinator = self feedViewController.coordinator = self
navigationController.pushViewController(feedViewController, animated: false) navigationController.pushViewController(feedViewController, animated: false)
@ -776,7 +776,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner {
clearTimelineIfNoLongerAvailable() clearTimelineIfNoLongerAvailable()
} }
func masterFeedIndexPathForCurrentTimeline() -> IndexPath? { func feedIndexPathForCurrentTimeline() -> IndexPath? {
guard let node = treeController.rootNode.descendantNodeRepresentingObject(timelineFeed as AnyObject) else { guard let node = treeController.rootNode.descendantNodeRepresentingObject(timelineFeed as AnyObject) else {
return nil return nil
} }
@ -825,7 +825,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner {
self.rebuildBackingStores() self.rebuildBackingStores()
} }
self.activityManager.invalidateSelecting() self.activityManager.invalidateSelecting()
if self.rootSplitViewController.isCollapsed && self.navControllerForTimeline().viewControllers.last is MasterTimelineViewController { if self.rootSplitViewController.isCollapsed && self.navControllerForTimeline().viewControllers.last is TimelineViewController {
self.navControllerForTimeline().popViewController(animated: animations.contains(.navigation)) self.navControllerForTimeline().popViewController(animated: animations.contains(.navigation))
} }
completion?() completion?()
@ -2099,9 +2099,9 @@ private extension SceneCoordinator {
// MARK: Three Panel Mode // MARK: Three Panel Mode
func installTimelineControllerIfNecessary(animated: Bool) { func installTimelineControllerIfNecessary(animated: Bool) {
if navControllerForTimeline().viewControllers.filter({ $0 is MasterTimelineViewController }).count < 1 { if navControllerForTimeline().viewControllers.filter({ $0 is TimelineViewController }).count < 1 {
isTimelineViewControllerPending = true isTimelineViewControllerPending = true
timelineViewController = UIStoryboard.main.instantiateController(ofType: MasterTimelineViewController.self) timelineViewController = UIStoryboard.main.instantiateController(ofType: TimelineViewController.self)
timelineViewController!.coordinator = self timelineViewController!.coordinator = self
navControllerForTimeline().pushViewController(timelineViewController!, animated: animated) navControllerForTimeline().pushViewController(timelineViewController!, animated: animated)
} }
@ -2216,7 +2216,7 @@ private extension SceneCoordinator {
} }
if currentFeedIndexPath != nil { if currentFeedIndexPath != nil {
timelineViewController = UIStoryboard.main.instantiateController(ofType: MasterTimelineViewController.self) timelineViewController = UIStoryboard.main.instantiateController(ofType: TimelineViewController.self)
timelineViewController!.coordinator = self timelineViewController!.coordinator = self
navigationController.pushViewController(timelineViewController!, animated: false) navigationController.pushViewController(timelineViewController!, animated: false)
} }

View File

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="9cW-lu-HoC"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="9cW-lu-HoC">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/>
@ -343,26 +342,26 @@
</connections> </connections>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="WR6-xo-ty2" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="WR6-xo-ty2" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
<rect key="frame" x="20" y="806" width="374" height="84"/> <rect key="frame" x="20" y="806" width="374" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="WR6-xo-ty2" id="zX8-l2-bVH"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="WR6-xo-ty2" id="zX8-l2-bVH">
<rect key="frame" x="0.0" y="0.0" width="374" height="84"/> <rect key="frame" x="0.0" y="0.0" width="374" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" verticalCompressionResistancePriority="751" ambiguous="YES" text="Enable Full Screen Articles" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="79e-5s-vd0"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" verticalCompressionResistancePriority="751" text="Enable Full Screen Articles" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="79e-5s-vd0">
<rect key="frame" x="20" y="11" width="202" height="15.5"/> <rect key="frame" x="20" y="11" width="202" height="15.5"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/> <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" ambiguous="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="2Md-2E-7Z4"> <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="2Md-2E-7Z4">
<rect key="frame" x="307" y="6" width="51" height="31"/> <rect key="frame" x="307" y="6" width="51" height="25.5"/>
<color key="onTintColor" name="primaryAccentColor"/> <color key="onTintColor" name="primaryAccentColor"/>
<connections> <connections>
<action selector="switchFullscreenArticles:" destination="a0p-rk-skQ" eventType="valueChanged" id="5fa-Ad-e0j"/> <action selector="switchFullscreenArticles:" destination="a0p-rk-skQ" eventType="valueChanged" id="5fa-Ad-e0j"/>
</connections> </connections>
</switch> </switch>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" ambiguous="YES" text="Tap the article top bar to enter Full Screen. Tap the top or bottom to exit." textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a30-nc-ZS4"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="Tap the article top bar to enter Full Screen. Tap the top or bottom to exit." textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a30-nc-ZS4">
<rect key="frame" x="20" y="33" width="262.5" height="0.0"/> <rect key="frame" x="20" y="33" width="262.5" height="0.0"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/> <fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/>
<nil key="textColor"/> <nil key="textColor"/>
@ -388,10 +387,10 @@
<tableViewSection headerTitle="Appearance" id="TkH-4v-yhk"> <tableViewSection headerTitle="Appearance" id="TkH-4v-yhk">
<cells> <cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" id="EvG-yE-gDF" customClass="VibrantBasicTableViewCell" customModule="NetNewsWire" customModuleProvider="target"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" id="EvG-yE-gDF" customClass="VibrantBasicTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
<rect key="frame" x="20" y="946" width="374" height="43.5"/> <rect key="frame" x="20" y="906" width="374" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="EvG-yE-gDF" id="wBN-zJ-6pN"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="EvG-yE-gDF" id="wBN-zJ-6pN">
<rect key="frame" x="0.0" y="0.0" width="343.5" height="43.5"/> <rect key="frame" x="0.0" y="0.0" width="343.5" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Color Palette" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2Fp-li-dGP"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Color Palette" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2Fp-li-dGP">
@ -425,7 +424,7 @@
<tableViewSection headerTitle="Help" id="CS8-fJ-ghn"> <tableViewSection headerTitle="Help" id="CS8-fJ-ghn">
<cells> <cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="uGk-2d-oFc" style="IBUITableViewCellStyleDefault" id="Tle-IV-D40" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="uGk-2d-oFc" style="IBUITableViewCellStyleDefault" id="Tle-IV-D40" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
<rect key="frame" x="20" y="1045.5" width="374" height="43.5"/> <rect key="frame" x="20" y="1006" width="374" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Tle-IV-D40" id="IJD-ZB-8Wm"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Tle-IV-D40" id="IJD-ZB-8Wm">
<rect key="frame" x="0.0" y="0.0" width="374" height="43.5"/> <rect key="frame" x="0.0" y="0.0" width="374" height="43.5"/>
@ -442,7 +441,7 @@
</tableViewCellContentView> </tableViewCellContentView>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="6G3-yV-Eyh" style="IBUITableViewCellStyleDefault" id="Tbf-fE-nfx" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="6G3-yV-Eyh" style="IBUITableViewCellStyleDefault" id="Tbf-fE-nfx" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
<rect key="frame" x="20" y="1089" width="374" height="43.5"/> <rect key="frame" x="20" y="1049.5" width="374" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Tbf-fE-nfx" id="beV-vI-g3r"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Tbf-fE-nfx" id="beV-vI-g3r">
<rect key="frame" x="0.0" y="0.0" width="374" height="43.5"/> <rect key="frame" x="0.0" y="0.0" width="374" height="43.5"/>
@ -459,7 +458,7 @@
</tableViewCellContentView> </tableViewCellContentView>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="NeD-y8-KrM" style="IBUITableViewCellStyleDefault" id="TIX-yK-rC6" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="NeD-y8-KrM" style="IBUITableViewCellStyleDefault" id="TIX-yK-rC6" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
<rect key="frame" x="20" y="1132.5" width="374" height="43.5"/> <rect key="frame" x="20" y="1093" width="374" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="TIX-yK-rC6" id="qr8-EN-Ofg"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="TIX-yK-rC6" id="qr8-EN-Ofg">
<rect key="frame" x="0.0" y="0.0" width="374" height="43.5"/> <rect key="frame" x="0.0" y="0.0" width="374" height="43.5"/>
@ -476,7 +475,7 @@
</tableViewCellContentView> </tableViewCellContentView>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="lfL-bQ-sOp" style="IBUITableViewCellStyleDefault" id="mFn-fE-zqa" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="lfL-bQ-sOp" style="IBUITableViewCellStyleDefault" id="mFn-fE-zqa" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
<rect key="frame" x="20" y="1176" width="374" height="43.5"/> <rect key="frame" x="20" y="1136.5" width="374" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="mFn-fE-zqa" id="jTe-mf-MRj"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="mFn-fE-zqa" id="jTe-mf-MRj">
<rect key="frame" x="0.0" y="0.0" width="374" height="43.5"/> <rect key="frame" x="0.0" y="0.0" width="374" height="43.5"/>
@ -493,7 +492,7 @@
</tableViewCellContentView> </tableViewCellContentView>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="DDJ-8P-3YY" style="IBUITableViewCellStyleDefault" id="iGs-ze-4gQ" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="DDJ-8P-3YY" style="IBUITableViewCellStyleDefault" id="iGs-ze-4gQ" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
<rect key="frame" x="20" y="1219.5" width="374" height="43.5"/> <rect key="frame" x="20" y="1180" width="374" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="iGs-ze-4gQ" id="EqZ-rF-N0l"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="iGs-ze-4gQ" id="EqZ-rF-N0l">
<rect key="frame" x="0.0" y="0.0" width="374" height="43.5"/> <rect key="frame" x="0.0" y="0.0" width="374" height="43.5"/>
@ -510,7 +509,7 @@
</tableViewCellContentView> </tableViewCellContentView>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="DsV-Qv-X4K" style="IBUITableViewCellStyleDefault" id="taJ-sg-wnU" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="DsV-Qv-X4K" style="IBUITableViewCellStyleDefault" id="taJ-sg-wnU" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
<rect key="frame" x="20" y="1263" width="374" height="44"/> <rect key="frame" x="20" y="1223.5" width="374" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="taJ-sg-wnU" id="axB-si-1KM"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="taJ-sg-wnU" id="axB-si-1KM">
<rect key="frame" x="0.0" y="0.0" width="374" height="44"/> <rect key="frame" x="0.0" y="0.0" width="374" height="44"/>
@ -527,7 +526,7 @@
</tableViewCellContentView> </tableViewCellContentView>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="zMz-hU-UYU" style="IBUITableViewCellStyleDefault" id="OXi-cg-ab9" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="zMz-hU-UYU" style="IBUITableViewCellStyleDefault" id="OXi-cg-ab9" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
<rect key="frame" x="20" y="1307" width="374" height="44"/> <rect key="frame" x="20" y="1267.5" width="374" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="OXi-cg-ab9" id="npR-a0-9wv"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="OXi-cg-ab9" id="npR-a0-9wv">
<rect key="frame" x="0.0" y="0.0" width="374" height="44"/> <rect key="frame" x="0.0" y="0.0" width="374" height="44"/>
@ -544,7 +543,7 @@
</tableViewCellContentView> </tableViewCellContentView>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="T7x-zl-6Yf" style="IBUITableViewCellStyleDefault" id="VpI-0o-3Px" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="T7x-zl-6Yf" style="IBUITableViewCellStyleDefault" id="VpI-0o-3Px" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
<rect key="frame" x="20" y="1351" width="374" height="44"/> <rect key="frame" x="20" y="1311.5" width="374" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="VpI-0o-3Px" id="xRH-i4-vne"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="VpI-0o-3Px" id="xRH-i4-vne">
<rect key="frame" x="0.0" y="0.0" width="374" height="44"/> <rect key="frame" x="0.0" y="0.0" width="374" height="44"/>
@ -561,7 +560,7 @@
</tableViewCellContentView> </tableViewCellContentView>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="76A-Ng-kfs" style="IBUITableViewCellStyleDefault" id="jK8-tv-hBD" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="76A-Ng-kfs" style="IBUITableViewCellStyleDefault" id="jK8-tv-hBD" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
<rect key="frame" x="20" y="1395" width="374" height="44"/> <rect key="frame" x="20" y="1355.5" width="374" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="jK8-tv-hBD" id="I7Q-GQ-u8Y"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="jK8-tv-hBD" id="I7Q-GQ-u8Y">
<rect key="frame" x="0.0" y="0.0" width="355.5" height="44"/> <rect key="frame" x="0.0" y="0.0" width="355.5" height="44"/>
@ -669,7 +668,7 @@
<objects> <objects>
<tableViewController storyboardIdentifier="AboutViewController" title="About" id="K5w-58-sQW" customClass="AboutViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController"> <tableViewController storyboardIdentifier="AboutViewController" title="About" id="K5w-58-sQW" customClass="AboutViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="insetGrouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="ybg-ki-AbJ"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="insetGrouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="ybg-ki-AbJ">
<rect key="frame" x="0.0" y="0.0" width="414" height="804"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<sections> <sections>
<tableViewSection id="apW-l0-gWz"> <tableViewSection id="apW-l0-gWz">
@ -821,7 +820,7 @@
<objects> <objects>
<viewController storyboardIdentifier="TimelineCustomizerViewController" title="Timeline Layout" id="amD-xZ-U3A" customClass="TimelineCustomizerViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController"> <viewController storyboardIdentifier="TimelineCustomizerViewController" title="Timeline Layout" id="amD-xZ-U3A" customClass="TimelineCustomizerViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="2Fb-t4-5QE"> <view key="view" contentMode="scaleToFill" id="2Fb-t4-5QE">
<rect key="frame" x="0.0" y="0.0" width="414" height="804"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Q4t-3M-goU"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Q4t-3M-goU">
@ -947,7 +946,7 @@
<rect key="frame" x="0.0" y="0.0" width="300" height="128"/> <rect key="frame" x="0.0" y="0.0" width="300" height="128"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<prototypes> <prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" id="Zaq-yo-L5h" customClass="MasterTimelineTableViewCell" customModule="NetNewsWire" customModuleProvider="target"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" id="Zaq-yo-L5h" customClass="TimelineTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
<rect key="frame" x="0.0" y="50" width="300" height="43.5"/> <rect key="frame" x="0.0" y="50" width="300" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Zaq-yo-L5h" id="fD5-nw-z0z"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Zaq-yo-L5h" id="fD5-nw-z0z">
@ -980,7 +979,7 @@
<objects> <objects>
<tableViewController storyboardIdentifier="ArticleThemesTableViewController" title="Article Themes" id="fO4-og-e41" customClass="ArticleThemesTableViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController"> <tableViewController storyboardIdentifier="ArticleThemesTableViewController" title="Article Themes" id="fO4-og-e41" customClass="ArticleThemesTableViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="insetGrouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="I8p-P9-C8h"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="insetGrouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="I8p-P9-C8h">
<rect key="frame" x="0.0" y="0.0" width="414" height="804"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/> <color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<prototypes> <prototypes>
@ -1019,7 +1018,7 @@
<objects> <objects>
<tableViewController storyboardIdentifier="ColorPaletteTableViewController" title="Color Palette" id="4je-jl-or5" customClass="ColorPaletteTableViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController"> <tableViewController storyboardIdentifier="ColorPaletteTableViewController" title="Color Palette" id="4je-jl-or5" customClass="ColorPaletteTableViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="insetGrouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="nt4-zl-48k"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="insetGrouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="nt4-zl-48k">
<rect key="frame" x="0.0" y="0.0" width="414" height="804"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/> <color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<prototypes> <prototypes>
@ -1063,10 +1062,10 @@
<color red="0.031372549019607843" green="0.41568627450980394" blue="0.93333333333333335" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.031372549019607843" green="0.41568627450980394" blue="0.93333333333333335" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<systemColor name="groupTableViewBackgroundColor"> <systemColor name="groupTableViewBackgroundColor">
<color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor> </systemColor>
<systemColor name="labelColor"> <systemColor name="labelColor">
<color red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor> </systemColor>
<systemColor name="secondaryLabelColor"> <systemColor name="secondaryLabelColor">
<color red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>

View File

@ -42,7 +42,7 @@ class TimelinePreviewTableViewController: UIViewController, UITableViewDelegate,
} }
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! MasterTimelineTableViewCell let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! TimelineTableViewCell
cell.cellData = prototypeCellData cell.cellData = prototypeCellData
return cell return cell
} }
@ -62,7 +62,7 @@ class TimelinePreviewTableViewController: UIViewController, UITableViewDelegate,
private extension TimelinePreviewTableViewController { private extension TimelinePreviewTableViewController {
var prototypeCellData: MasterTimelineCellData { var prototypeCellData: TimelineCellData {
let longTitle = "Enim ut tellus elementum sagittis vitae et. Nibh praesent tristique magna sit amet purus gravida quis blandit. Neque volutpat ac tincidunt vitae semper quis lectus nulla. Massa id neque aliquam vestibulum morbi blandit. Ultrices vitae auctor eu augue. Enim eu turpis egestas pretium aenean pharetra magna. Eget gravida cum sociis natoque. Sit amet consectetur adipiscing elit. Auctor eu augue ut lectus arcu bibendum. Maecenas volutpat blandit aliquam etiam erat velit. Ut pharetra sit amet aliquam id diam maecenas ultricies. In hac habitasse platea dictumst quisque sagittis purus sit amet." let longTitle = "Enim ut tellus elementum sagittis vitae et. Nibh praesent tristique magna sit amet purus gravida quis blandit. Neque volutpat ac tincidunt vitae semper quis lectus nulla. Massa id neque aliquam vestibulum morbi blandit. Ultrices vitae auctor eu augue. Enim eu turpis egestas pretium aenean pharetra magna. Eget gravida cum sociis natoque. Sit amet consectetur adipiscing elit. Auctor eu augue ut lectus arcu bibendum. Maecenas volutpat blandit aliquam etiam erat velit. Ut pharetra sit amet aliquam id diam maecenas ultricies. In hac habitasse platea dictumst quisque sagittis purus sit amet."
let prototypeID = "prototype" let prototypeID = "prototype"
@ -71,7 +71,7 @@ private extension TimelinePreviewTableViewController {
let iconImage = IconImage(AppAssets.faviconTemplateImage.withTintColor(AppAssets.secondaryAccentColor)) let iconImage = IconImage(AppAssets.faviconTemplateImage.withTintColor(AppAssets.secondaryAccentColor))
return MasterTimelineCellData(article: prototypeArticle, showFeedName: .feed, feedName: "Feed Name", byline: nil, iconImage: iconImage, showIcon: true, featuredImage: nil, numberOfLines: AppDefaults.shared.timelineNumberOfLines, iconSize: AppDefaults.shared.timelineIconSize) return TimelineCellData(article: prototypeArticle, showFeedName: .feed, feedName: "Feed Name", byline: nil, iconImage: iconImage, showIcon: true, featuredImage: nil, numberOfLines: AppDefaults.shared.timelineNumberOfLines, iconSize: AppDefaults.shared.timelineIconSize)
} }
} }

View File

@ -20,7 +20,7 @@ struct TimelineAccessibilityCellLayout: TimelineCellLayout {
let feedNameRect: CGRect let feedNameRect: CGRect
let dateRect: CGRect let dateRect: CGRect
init(width: CGFloat, insets: UIEdgeInsets, cellData: MasterTimelineCellData) { init(width: CGFloat, insets: UIEdgeInsets, cellData: TimelineCellData) {
var currentPoint = CGPoint.zero var currentPoint = CGPoint.zero
currentPoint.x = TimelineDefaultCellLayout.cellPadding.left + insets.left + TimelineDefaultCellLayout.unreadCircleMarginLeft currentPoint.x = TimelineDefaultCellLayout.cellPadding.left + insets.left + TimelineDefaultCellLayout.unreadCircleMarginLeft
@ -75,7 +75,7 @@ struct TimelineAccessibilityCellLayout: TimelineCellLayout {
private extension TimelineAccessibilityCellLayout { private extension TimelineAccessibilityCellLayout {
static func rectForDate(_ cellData: MasterTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect { static func rectForDate(_ cellData: TimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect {
var r = CGRect.zero var r = CGRect.zero

View File

@ -1,5 +1,5 @@
// //
// MasterTimelineCellData.swift // TimelineCellData.swift
// NetNewsWire // NetNewsWire
// //
// Created by Brent Simmons on 2/6/16. // Created by Brent Simmons on 2/6/16.
@ -9,7 +9,7 @@
import UIKit import UIKit
import Articles import Articles
struct MasterTimelineCellData { struct TimelineCellData {
private static let noText = NSLocalizedString("(No Text)", comment: "No Text") private static let noText = NSLocalizedString("(No Text)", comment: "No Text")

View File

@ -49,7 +49,7 @@ extension TimelineCellLayout {
return r return r
} }
static func rectForTitle(_ cellData: MasterTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> (CGRect, Int) { static func rectForTitle(_ cellData: TimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> (CGRect, Int) {
var r = CGRect.zero var r = CGRect.zero
if cellData.title.isEmpty { if cellData.title.isEmpty {
@ -70,7 +70,7 @@ extension TimelineCellLayout {
} }
static func rectForSummary(_ cellData: MasterTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat, _ linesUsed: Int) -> CGRect { static func rectForSummary(_ cellData: TimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat, _ linesUsed: Int) -> CGRect {
let linesLeft = cellData.numberOfLines - linesUsed let linesLeft = cellData.numberOfLines - linesUsed
@ -93,7 +93,7 @@ extension TimelineCellLayout {
} }
static func rectForFeedName(_ cellData: MasterTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect { static func rectForFeedName(_ cellData: TimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect {
var r = CGRect.zero var r = CGRect.zero
r.origin = point r.origin = point

View File

@ -52,7 +52,7 @@ struct TimelineDefaultCellLayout: TimelineCellLayout {
let feedNameRect: CGRect let feedNameRect: CGRect
let dateRect: CGRect let dateRect: CGRect
init(width: CGFloat, insets: UIEdgeInsets, cellData: MasterTimelineCellData) { init(width: CGFloat, insets: UIEdgeInsets, cellData: TimelineCellData) {
var currentPoint = CGPoint.zero var currentPoint = CGPoint.zero
currentPoint.x = TimelineDefaultCellLayout.cellPadding.left + insets.left + TimelineDefaultCellLayout.unreadCircleMarginLeft currentPoint.x = TimelineDefaultCellLayout.cellPadding.left + insets.left + TimelineDefaultCellLayout.unreadCircleMarginLeft
@ -110,7 +110,7 @@ struct TimelineDefaultCellLayout: TimelineCellLayout {
extension TimelineDefaultCellLayout { extension TimelineDefaultCellLayout {
static func rectForDate(_ cellData: MasterTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect { static func rectForDate(_ cellData: TimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect {
var r = CGRect.zero var r = CGRect.zero

View File

@ -1,5 +1,5 @@
// //
// MasterTimelineTableViewCell.swift // TimelineTableViewCell.swift
// NetNewsWire // NetNewsWire
// //
// Created by Brent Simmons on 8/31/15. // Created by Brent Simmons on 8/31/15.
@ -9,13 +9,13 @@
import UIKit import UIKit
import RSCore import RSCore
class MasterTimelineTableViewCell: VibrantTableViewCell { class TimelineTableViewCell: VibrantTableViewCell {
private let titleView = MasterTimelineTableViewCell.multiLineUILabel() private let titleView = TimelineTableViewCell.multiLineUILabel()
private let summaryView = MasterTimelineTableViewCell.multiLineUILabel() private let summaryView = TimelineTableViewCell.multiLineUILabel()
private let unreadIndicatorView = MasterUnreadIndicatorView(frame: CGRect.zero) private let unreadIndicatorView = UnreadIndicatorView(frame: CGRect.zero)
private let dateView = MasterTimelineTableViewCell.singleLineUILabel() private let dateView = TimelineTableViewCell.singleLineUILabel()
private let feedNameView = MasterTimelineTableViewCell.singleLineUILabel() private let feedNameView = TimelineTableViewCell.singleLineUILabel()
private lazy var iconView = IconView() private lazy var iconView = IconView()
@ -26,7 +26,7 @@ class MasterTimelineTableViewCell: VibrantTableViewCell {
private var unreadIndicatorPropertyAnimator: UIViewPropertyAnimator? private var unreadIndicatorPropertyAnimator: UIViewPropertyAnimator?
private var starViewPropertyAnimator: UIViewPropertyAnimator? private var starViewPropertyAnimator: UIViewPropertyAnimator?
var cellData: MasterTimelineCellData! { var cellData: TimelineCellData! {
didSet { didSet {
updateSubviews() updateSubviews()
} }
@ -106,7 +106,7 @@ class MasterTimelineTableViewCell: VibrantTableViewCell {
// MARK: - Private // MARK: - Private
private extension MasterTimelineTableViewCell { private extension TimelineTableViewCell {
static func singleLineUILabel() -> UILabel { static func singleLineUILabel() -> UILabel {
let label = NonIntrinsicLabel() let label = NonIntrinsicLabel()

View File

@ -1,5 +1,5 @@
// //
// MasterUnreadIndicatorView.swift // UnreadIndicatorView.swift
// NetNewsWire // NetNewsWire
// //
// Created by Brent Simmons on 2/16/16. // Created by Brent Simmons on 2/16/16.
@ -8,7 +8,7 @@
import UIKit import UIKit
class MasterUnreadIndicatorView: UIView { class UnreadIndicatorView: UIView {
override func layoutSubviews() { override func layoutSubviews() {
super.layoutSubviews() super.layoutSubviews()

View File

@ -8,7 +8,7 @@
import UIKit import UIKit
class MasterTimelineUnreadCountView: MasterFeedUnreadCountView { class MasterTimelineUnreadCountView: FeedUnreadCountView {
override var padding: UIEdgeInsets { override var padding: UIEdgeInsets {
return UIEdgeInsets(top: 2.0, left: 9.0, bottom: 2.0, right: 9.0) return UIEdgeInsets(top: 2.0, left: 9.0, bottom: 2.0, right: 9.0)

View File

@ -1,5 +1,5 @@
// //
// MasterTimelineViewController.swift // TimelineViewController.swift
// NetNewsWire // NetNewsWire
// //
// Created by Maurice Parker on 4/8/19. // Created by Maurice Parker on 4/8/19.
@ -11,7 +11,7 @@ import RSCore
import Account import Account
import Articles import Articles
class MasterTimelineViewController: UITableViewController, UndoableCommandRunner { class TimelineViewController: UITableViewController, UndoableCommandRunner {
private var numberOfTextLines = 0 private var numberOfTextLines = 0
private var iconSize = IconSize.medium private var iconSize = IconSize.medium
@ -436,7 +436,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
for article in visibleUpdatedArticles { for article in visibleUpdatedArticles {
if let indexPath = dataSource.indexPath(for: article) { if let indexPath = dataSource.indexPath(for: article) {
if let cell = tableView.cellForRow(at: indexPath) as? MasterTimelineTableViewCell { if let cell = tableView.cellForRow(at: indexPath) as? TimelineTableViewCell {
configure(cell, article: article) configure(cell, article: article)
} }
} }
@ -456,7 +456,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
guard let article = dataSource.itemIdentifier(for: indexPath) else { guard let article = dataSource.itemIdentifier(for: indexPath) else {
return return
} }
if article.feed == feed, let cell = tableView.cellForRow(at: indexPath) as? MasterTimelineTableViewCell, let image = iconImageFor(article) { if article.feed == feed, let cell = tableView.cellForRow(at: indexPath) as? TimelineTableViewCell, let image = iconImageFor(article) {
cell.setIconImage(image) cell.setIconImage(image)
} }
} }
@ -471,7 +471,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
return return
} }
for author in authors { for author in authors {
if author.avatarURL == avatarURL, let cell = tableView.cellForRow(at: indexPath) as? MasterTimelineTableViewCell, let image = iconImageFor(article) { if author.avatarURL == avatarURL, let cell = tableView.cellForRow(at: indexPath) as? TimelineTableViewCell, let image = iconImageFor(article) {
cell.setIconImage(image) cell.setIconImage(image)
} }
} }
@ -544,7 +544,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
let status = ArticleStatus(articleID: prototypeID, read: false, starred: false, dateArrived: Date()) let status = ArticleStatus(articleID: prototypeID, read: false, starred: false, dateArrived: Date())
let prototypeArticle = Article(accountID: prototypeID, articleID: prototypeID, feedID: prototypeID, uniqueID: prototypeID, title: Constants.prototypeText, contentHTML: nil, contentText: nil, url: nil, externalURL: nil, summary: nil, imageURL: nil, datePublished: nil, dateModified: nil, authors: nil, status: status) let prototypeArticle = Article(accountID: prototypeID, articleID: prototypeID, feedID: prototypeID, uniqueID: prototypeID, title: Constants.prototypeText, contentHTML: nil, contentText: nil, url: nil, externalURL: nil, summary: nil, imageURL: nil, datePublished: nil, dateModified: nil, authors: nil, status: status)
let prototypeCellData = MasterTimelineCellData(article: prototypeArticle, showFeedName: .feed, feedName: "Prototype Feed Name", byline: nil, iconImage: nil, showIcon: false, featuredImage: nil, numberOfLines: numberOfTextLines, iconSize: iconSize) let prototypeCellData = TimelineCellData(article: prototypeArticle, showFeedName: .feed, feedName: "Prototype Feed Name", byline: nil, iconImage: nil, showIcon: false, featuredImage: nil, numberOfLines: numberOfTextLines, iconSize: iconSize)
if UIApplication.shared.preferredContentSizeCategory.isAccessibilityCategory { if UIApplication.shared.preferredContentSizeCategory.isAccessibilityCategory {
let layout = TimelineAccessibilityCellLayout(width: tableView.bounds.width, insets: tableView.safeAreaInsets, cellData: prototypeCellData) let layout = TimelineAccessibilityCellLayout(width: tableView.bounds.width, insets: tableView.safeAreaInsets, cellData: prototypeCellData)
@ -560,7 +560,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
// MARK: Searching // MARK: Searching
extension MasterTimelineViewController: UISearchControllerDelegate { extension TimelineViewController: UISearchControllerDelegate {
func willPresentSearchController(_ searchController: UISearchController) { func willPresentSearchController(_ searchController: UISearchController) {
coordinator.beginSearching() coordinator.beginSearching()
@ -574,7 +574,7 @@ extension MasterTimelineViewController: UISearchControllerDelegate {
} }
extension MasterTimelineViewController: UISearchResultsUpdating { extension TimelineViewController: UISearchResultsUpdating {
func updateSearchResults(for searchController: UISearchController) { func updateSearchResults(for searchController: UISearchController) {
let searchScope = SearchScope(rawValue: searchController.searchBar.selectedScopeButtonIndex)! let searchScope = SearchScope(rawValue: searchController.searchBar.selectedScopeButtonIndex)!
@ -583,7 +583,7 @@ extension MasterTimelineViewController: UISearchResultsUpdating {
} }
extension MasterTimelineViewController: UISearchBarDelegate { extension TimelineViewController: UISearchBarDelegate {
func searchBar(_ searchBar: UISearchBar, selectedScopeButtonIndexDidChange selectedScope: Int) { func searchBar(_ searchBar: UISearchBar, selectedScopeButtonIndexDidChange selectedScope: Int) {
let searchScope = SearchScope(rawValue: selectedScope)! let searchScope = SearchScope(rawValue: selectedScope)!
coordinator.searchArticles(searchBar.text!, searchScope) coordinator.searchArticles(searchBar.text!, searchScope)
@ -592,7 +592,7 @@ extension MasterTimelineViewController: UISearchBarDelegate {
// MARK: Private // MARK: Private
private extension MasterTimelineViewController { private extension TimelineViewController {
func configureToolbar() { func configureToolbar() {
@ -708,8 +708,8 @@ private extension MasterTimelineViewController {
func makeDataSource() -> UITableViewDiffableDataSource<Int, Article> { func makeDataSource() -> UITableViewDiffableDataSource<Int, Article> {
let dataSource: UITableViewDiffableDataSource<Int, Article> = let dataSource: UITableViewDiffableDataSource<Int, Article> =
MasterTimelineDataSource(tableView: tableView, cellProvider: { [weak self] tableView, indexPath, article in TimelineDataSource(tableView: tableView, cellProvider: { [weak self] tableView, indexPath, article in
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! MasterTimelineTableViewCell let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! TimelineTableViewCell
self?.configure(cell, article: article) self?.configure(cell, article: article)
return cell return cell
}) })
@ -717,14 +717,14 @@ private extension MasterTimelineViewController {
return dataSource return dataSource
} }
func configure(_ cell: MasterTimelineTableViewCell, article: Article) { func configure(_ cell: TimelineTableViewCell, article: Article) {
let iconImage = iconImageFor(article) let iconImage = iconImageFor(article)
let featuredImage = featuredImageFor(article) let featuredImage = featuredImageFor(article)
let showFeedNames = coordinator.showFeedNames let showFeedNames = coordinator.showFeedNames
let showIcon = coordinator.showIcons && iconImage != nil let showIcon = coordinator.showIcons && iconImage != nil
cell.cellData = MasterTimelineCellData(article: article, showFeedName: showFeedNames, feedName: article.feed?.nameForDisplay, byline: article.byline(), iconImage: iconImage, showIcon: showIcon, featuredImage: featuredImage, numberOfLines: numberOfTextLines, iconSize: iconSize) cell.cellData = TimelineCellData(article: article, showFeedName: showFeedNames, feedName: article.feed?.nameForDisplay, byline: article.byline(), iconImage: iconImage, showIcon: showIcon, featuredImage: featuredImage, numberOfLines: numberOfTextLines, iconSize: iconSize)
} }

View File

@ -1,5 +1,5 @@
// //
// MasterTimelineDataSource.swift // TimelineDataSource.swift
// NetNewsWire-iOS // NetNewsWire-iOS
// //
// Created by Maurice Parker on 8/30/19. // Created by Maurice Parker on 8/30/19.
@ -8,7 +8,7 @@
import UIKit import UIKit
class MasterTimelineDataSource<SectionIdentifierType, ItemIdentifierType>: UITableViewDiffableDataSource<SectionIdentifierType, ItemIdentifierType> where SectionIdentifierType : Hashable, ItemIdentifierType : Hashable { class TimelineDataSource<SectionIdentifierType, ItemIdentifierType>: UITableViewDiffableDataSource<SectionIdentifierType, ItemIdentifierType> where SectionIdentifierType : Hashable, ItemIdentifierType : Hashable {
override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
return true return true