mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-30 01:10:38 +00:00
💄 Timeline Customiser uses new cells fixes #4723
& provided dual previews
This commit is contained in:
6 files changed
+415
-326
No files matched your search
@@ -0,0 +1,130 @@
|
||||
//
|
||||
// ModernTimelineCustomizerTableViewController.swift
|
||||
// NetNewsWire-iOS
|
||||
//
|
||||
// Created by Stuart Breckenridge on 21/08/2025.
|
||||
// Copyright © 2025 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import Articles
|
||||
|
||||
class ModernTimelineCustomizerTableViewController: UITableViewController {
|
||||
|
||||
|
||||
private var previewArticle: Article {
|
||||
var components = DateComponents()
|
||||
components.year = 1925
|
||||
components.month = 4
|
||||
components.day = 10
|
||||
|
||||
let calendar = Calendar.current
|
||||
let date = calendar.date(from: components)!
|
||||
|
||||
return Article(accountID: "_testID",
|
||||
articleID: "_testArticleID",
|
||||
webFeedID: "_testWebFeedID",
|
||||
uniqueID: UUID().uuidString,
|
||||
title: "Chapter 1",
|
||||
contentHTML: nil,
|
||||
contentText: "In my younger and more vulnerable years my father gave me some advice that I’ve been turning over in my mind ever since. 'Whenever you feel like criticizing any one,' he told me, 'just remember that all the people in this world haven’t had the advantages that you’ve had.'",
|
||||
url: nil,
|
||||
externalURL: nil,
|
||||
summary: nil,
|
||||
imageURL: nil,
|
||||
datePublished: date,
|
||||
dateModified: nil,
|
||||
authors: Set([Author(authorID: "_testAuthorID", name: "F. Scott Fitzgerald", url: nil, avatarURL: nil, emailAddress: nil)!]),
|
||||
status: ArticleStatus(articleID: "_testArticleID", read: false, starred: false, dateArrived: .now))
|
||||
}
|
||||
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
title = NSLocalizedString("Timeline Customizer", comment: "Timeline Customizer")
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange(_:)), name: UserDefaults.didChangeNotification, object: nil)
|
||||
|
||||
}
|
||||
|
||||
|
||||
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
||||
tableView.reloadSections(IndexSet(integer: 2), with: .fade)
|
||||
}
|
||||
|
||||
// MARK: - Table view data source
|
||||
|
||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
return 3
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
if section == 2 { return 2 }
|
||||
return 1
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
|
||||
if section == 0 { return NSLocalizedString("Icon Size", comment: "Icon Size")}
|
||||
if section == 1 { return NSLocalizedString("Number of Lines", comment: "Number of Lines")}
|
||||
return NSLocalizedString("Previews", comment: "Previews")
|
||||
}
|
||||
|
||||
|
||||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
if indexPath.section == 0 {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: "IconSizeCell") as! ModernTimelineSliderCell
|
||||
cell.sliderConfiguration = .iconSize
|
||||
return cell
|
||||
}
|
||||
|
||||
if indexPath.section == 1 {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: "NumberOfLinesCell") as! ModernTimelineSliderCell
|
||||
cell.sliderConfiguration = .numberOfLines
|
||||
return cell
|
||||
}
|
||||
|
||||
|
||||
if indexPath.section == 2 && indexPath.row == 0 {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: "MainTimelineIconFeedCell") as? MainTimelineIconFeedCell ?? MainTimelineIconFeedCell()
|
||||
cell.cellData = MainTimelineCellData(article: previewArticle,
|
||||
showFeedName: .byline,
|
||||
feedName: "The Great Gatsby",
|
||||
byline: "F. Scott Fitzgerald",
|
||||
iconImage: IconImage(UIImage(named: "nnwFeedIcon")!),
|
||||
showIcon: true,
|
||||
numberOfLines: AppDefaults.shared.timelineNumberOfLines,
|
||||
iconSize: AppDefaults.shared.timelineIconSize)
|
||||
return cell
|
||||
}
|
||||
|
||||
if indexPath.section == 2 && indexPath.row == 1 {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: "MainTimelineFeedCell") as? MainTimelineFeedCell ?? MainTimelineFeedCell()
|
||||
cell.cellData = MainTimelineCellData(article: previewArticle,
|
||||
showFeedName: .byline,
|
||||
feedName: "The Great Gatsby",
|
||||
byline: "F. Scott Fitzgerald",
|
||||
iconImage: nil,
|
||||
showIcon: false,
|
||||
numberOfLines: AppDefaults.shared.timelineNumberOfLines,
|
||||
iconSize: AppDefaults.shared.timelineIconSize)
|
||||
return cell
|
||||
}
|
||||
|
||||
return UITableViewCell()
|
||||
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, willSelectRowAt indexPath: IndexPath) -> IndexPath? {
|
||||
return nil
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, shouldHighlightRowAt indexPath: IndexPath) -> Bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// MARK: - Notifications
|
||||
@objc func userDefaultsDidChange(_ note: Notification) {
|
||||
tableView.reloadSections(IndexSet(integer: 2), with: .none)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// ModernTimelineSliderCell.swift
|
||||
// NetNewsWire-iOS
|
||||
//
|
||||
// Created by Stuart Breckenridge on 21/08/2025.
|
||||
// Copyright © 2025 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
enum SliderConfiguration {
|
||||
case numberOfLines
|
||||
case iconSize
|
||||
}
|
||||
|
||||
class ModernTimelineSliderCell: UITableViewCell {
|
||||
|
||||
|
||||
@IBOutlet weak var slider: UISlider!
|
||||
|
||||
var sliderConfiguration: SliderConfiguration! {
|
||||
didSet {
|
||||
switch sliderConfiguration {
|
||||
case .numberOfLines:
|
||||
slider.minimumValue = 1
|
||||
slider.maximumValue = 6
|
||||
slider.trackConfiguration = .init(allowsTickValuesOnly: true, numberOfTicks: 6)
|
||||
slider.value = Float(AppDefaults.shared.timelineNumberOfLines)
|
||||
case .iconSize:
|
||||
slider.minimumValue = 1
|
||||
slider.maximumValue = 3
|
||||
slider.trackConfiguration = .init(allowsTickValuesOnly: true, numberOfTicks: 3)
|
||||
slider.value = Float(AppDefaults.shared.timelineIconSize.rawValue)
|
||||
case .none:
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
override func setSelected(_ selected: Bool, animated: Bool) {
|
||||
super.setSelected(selected, animated: animated)
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@IBAction func sliderValueChanges(_ sender: Any) {
|
||||
switch sliderConfiguration {
|
||||
case .numberOfLines:
|
||||
AppDefaults.shared.timelineNumberOfLines = Int(slider.value.rounded())
|
||||
case .iconSize:
|
||||
guard let iconSize = IconSize(rawValue: Int(slider.value.rounded())) else { return }
|
||||
AppDefaults.shared.timelineIconSize = iconSize
|
||||
case .none:
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+221
-153
@@ -1,10 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="24093.9" 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="24123.1" 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"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="24057"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="24062"/>
|
||||
<capability name="Named colors" minToolsVersion="9.0"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="Stack View standard spacing" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
@@ -578,6 +579,222 @@
|
||||
</objects>
|
||||
<point key="canvasLocation" x="983" y="151"/>
|
||||
</scene>
|
||||
<!--Modern Timeline Customizer Table View Controller-->
|
||||
<scene sceneID="6Fj-Lg-xsy">
|
||||
<objects>
|
||||
<tableViewController storyboardIdentifier="ModernTimelineCustomizerTableViewController" id="Tc9-Yc-Fvc" customClass="ModernTimelineCustomizerTableViewController" 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="24" estimatedSectionHeaderHeight="-1" sectionFooterHeight="18" estimatedSectionFooterHeight="-1" id="Q8W-CZ-Qtv">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="746"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" systemColor="systemGroupedBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="IconSizeCell" rowHeight="54" id="yLd-K7-6Or" userLabel="SliderCell" customClass="ModernTimelineSliderCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="55.5" width="414" height="54"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" tableViewCell="yLd-K7-6Or" id="KDr-vA-pJ5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="54"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="1" maxValue="3" translatesAutoresizingMaskIntoConstraints="NO" id="mxj-aP-b1p">
|
||||
<rect key="frame" x="20" y="9" width="374" height="37"/>
|
||||
<color key="thumbTintColor" name="primaryAccentColor"/>
|
||||
<connections>
|
||||
<action selector="sliderValueChanges:" destination="yLd-K7-6Or" eventType="valueChanged" id="FRO-pj-Nml"/>
|
||||
</connections>
|
||||
</slider>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="YX7-cc-X0D"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YX7-cc-X0D" firstAttribute="trailing" secondItem="mxj-aP-b1p" secondAttribute="trailing" constant="20" id="6mr-Cs-f1B"/>
|
||||
<constraint firstAttribute="bottom" secondItem="mxj-aP-b1p" secondAttribute="bottom" constant="8" id="Bzo-NL-fl1"/>
|
||||
<constraint firstItem="mxj-aP-b1p" firstAttribute="leading" secondItem="YX7-cc-X0D" secondAttribute="leading" constant="20" id="Qjf-Dg-6MF"/>
|
||||
<constraint firstItem="mxj-aP-b1p" firstAttribute="top" secondItem="KDr-vA-pJ5" secondAttribute="top" constant="9" id="scs-Am-twE"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="slider" destination="mxj-aP-b1p" id="GuX-S9-g9W"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="NumberOfLinesCell" rowHeight="54" id="jcy-BU-y0G" userLabel="SliderCell" customClass="ModernTimelineSliderCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="109.5" width="414" height="54"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" tableViewCell="jcy-BU-y0G" id="MLf-8T-Iis">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="54"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="1" maxValue="3" translatesAutoresizingMaskIntoConstraints="NO" id="VrS-AA-rmv">
|
||||
<rect key="frame" x="20" y="9" width="374" height="37"/>
|
||||
<color key="thumbTintColor" name="primaryAccentColor"/>
|
||||
<connections>
|
||||
<action selector="sliderValueChanges:" destination="jcy-BU-y0G" eventType="valueChanged" id="S5x-LL-h8X"/>
|
||||
</connections>
|
||||
</slider>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="nuD-rL-VaM"/>
|
||||
<constraints>
|
||||
<constraint firstItem="nuD-rL-VaM" firstAttribute="trailing" secondItem="VrS-AA-rmv" secondAttribute="trailing" constant="20" id="2V5-0G-7GV"/>
|
||||
<constraint firstAttribute="bottom" secondItem="VrS-AA-rmv" secondAttribute="bottom" constant="8" id="AlG-yn-8Xh"/>
|
||||
<constraint firstItem="VrS-AA-rmv" firstAttribute="top" secondItem="MLf-8T-Iis" secondAttribute="top" constant="9" id="FR8-Zr-hlH"/>
|
||||
<constraint firstItem="VrS-AA-rmv" firstAttribute="leading" secondItem="nuD-rL-VaM" secondAttribute="leading" constant="20" id="t3P-Yc-U15"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="slider" destination="VrS-AA-rmv" id="jf5-NH-dB4"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="MainTimelineFeedCell" rowHeight="54" id="b73-mH-qmJ" customClass="MainTimelineFeedCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="163.5" width="414" height="54"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" tableViewCell="b73-mH-qmJ" id="6Jn-X3-AqM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="54"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="E3D-Ly-GRK" customClass="IconView" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="15" y="15" width="16" height="16"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="mke-vQ-blX"/>
|
||||
<constraint firstAttribute="width" constant="16" id="r38-JX-8dX"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Article Title" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gwV-mE-Eju">
|
||||
<rect key="frame" x="39" y="15" width="355" height="16"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="fGC-ko-PtD">
|
||||
<rect key="frame" x="39" y="32" width="355" height="14.5"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="authorByLine" textAlignment="natural" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="P7G-Eh-7RI">
|
||||
<rect key="frame" x="0.0" y="0.0" width="194.5" height="14.5"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
|
||||
<color key="textColor" systemColor="secondaryLabelColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="articleDate" textAlignment="right" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mo8-RC-RLn">
|
||||
<rect key="frame" x="194.5" y="0.0" width="160.5" height="14.5"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
|
||||
<color key="textColor" systemColor="secondaryLabelColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="6BY-Wz-ai0"/>
|
||||
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="E3D-Ly-GRK" firstAttribute="leading" secondItem="6BY-Wz-ai0" secondAttribute="leading" constant="15" id="1nB-Pq-wCR"/>
|
||||
<constraint firstItem="6BY-Wz-ai0" firstAttribute="bottom" secondItem="fGC-ko-PtD" secondAttribute="bottom" constant="7.6666666666666217" id="G0U-ew-Y4w"/>
|
||||
<constraint firstItem="gwV-mE-Eju" firstAttribute="leading" secondItem="E3D-Ly-GRK" secondAttribute="trailing" constant="8" symbolic="YES" id="L71-vL-Mpr"/>
|
||||
<constraint firstItem="fGC-ko-PtD" firstAttribute="top" secondItem="gwV-mE-Eju" secondAttribute="bottom" constant="0.6666666666666714" id="QYq-Qj-7Vt"/>
|
||||
<constraint firstItem="fGC-ko-PtD" firstAttribute="leading" secondItem="gwV-mE-Eju" secondAttribute="leading" id="X7c-5F-nfx"/>
|
||||
<constraint firstItem="gwV-mE-Eju" firstAttribute="top" secondItem="6BY-Wz-ai0" secondAttribute="top" constant="15" id="kJu-Gq-uRY"/>
|
||||
<constraint firstItem="6BY-Wz-ai0" firstAttribute="trailing" secondItem="gwV-mE-Eju" secondAttribute="trailing" constant="20" id="qzB-aP-vwJ"/>
|
||||
<constraint firstItem="6BY-Wz-ai0" firstAttribute="trailing" secondItem="fGC-ko-PtD" secondAttribute="trailing" constant="20" id="tDY-ty-FFk"/>
|
||||
<constraint firstItem="E3D-Ly-GRK" firstAttribute="top" secondItem="6BY-Wz-ai0" secondAttribute="top" constant="15" id="vlH-QL-dFa"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<outlet property="articleDate" destination="mo8-RC-RLn" id="2ed-kK-H6F"/>
|
||||
<outlet property="articleTitle" destination="gwV-mE-Eju" id="Es3-Bg-h3p"/>
|
||||
<outlet property="authorByLine" destination="P7G-Eh-7RI" id="X8B-Ht-bTG"/>
|
||||
<outlet property="indicatorView" destination="E3D-Ly-GRK" id="kuB-57-XGD"/>
|
||||
<outlet property="metaDataStackView" destination="fGC-ko-PtD" id="nzZ-mR-uwq"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="MainTimelineIconFeedCell" rowHeight="54" id="R7O-v4-9Wp" customClass="MainTimelineIconFeedCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="217.5" width="414" height="54"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" tableViewCell="R7O-v4-9Wp" id="Pz0-v0-Ui0">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="54"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Article Title" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="D08-JZ-OXx">
|
||||
<rect key="frame" x="88" y="15" width="306" height="15.5"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Tms-jW-A6w" customClass="IconView" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="44" y="15" width="36" height="36"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="36" id="MC4-Rl-S6b"/>
|
||||
<constraint firstAttribute="width" constant="36" id="nTW-o6-cZb"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bWD-9m-Fch" customClass="IconView" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="15" width="16" height="16"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="T1h-cS-jdq"/>
|
||||
<constraint firstAttribute="width" constant="16" id="dmA-Gg-PjR"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="Zz9-ug-cmp">
|
||||
<rect key="frame" x="88" y="31.5" width="306" height="14.5"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="authorByLine" textAlignment="natural" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M4A-5J-4Kd">
|
||||
<rect key="frame" x="0.0" y="0.0" width="167.5" height="14.5"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
|
||||
<color key="textColor" systemColor="secondaryLabelColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="articleDate" textAlignment="right" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kvo-fg-kta">
|
||||
<rect key="frame" x="175.5" y="0.0" width="130.5" height="14.5"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
|
||||
<color key="textColor" systemColor="secondaryLabelColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="M4A-5J-4Kd" firstAttribute="leading" secondItem="Zz9-ug-cmp" secondAttribute="leading" id="s2N-d0-7dE"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="0dz-eB-6XG"/>
|
||||
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="0dz-eB-6XG" firstAttribute="trailing" secondItem="Zz9-ug-cmp" secondAttribute="trailing" constant="20" id="2OC-lr-ZJf"/>
|
||||
<constraint firstItem="bWD-9m-Fch" firstAttribute="leading" secondItem="0dz-eB-6XG" secondAttribute="leading" constant="20" id="3tX-qX-lRQ"/>
|
||||
<constraint firstItem="Zz9-ug-cmp" firstAttribute="top" secondItem="D08-JZ-OXx" secondAttribute="bottom" constant="1.0000000000000142" id="7FK-Vt-MAK"/>
|
||||
<constraint firstItem="bWD-9m-Fch" firstAttribute="top" secondItem="0dz-eB-6XG" secondAttribute="top" constant="15" id="Cpp-4m-3v3"/>
|
||||
<constraint firstItem="Tms-jW-A6w" firstAttribute="leading" secondItem="bWD-9m-Fch" secondAttribute="trailing" constant="8" symbolic="YES" id="Kz3-6y-5X7"/>
|
||||
<constraint firstItem="0dz-eB-6XG" firstAttribute="trailing" secondItem="D08-JZ-OXx" secondAttribute="trailing" constant="20" id="TEf-T9-7WR"/>
|
||||
<constraint firstItem="D08-JZ-OXx" firstAttribute="top" secondItem="0dz-eB-6XG" secondAttribute="top" constant="15" id="YXW-8o-3mC"/>
|
||||
<constraint firstItem="Zz9-ug-cmp" firstAttribute="leading" secondItem="D08-JZ-OXx" secondAttribute="leading" id="eAa-Qw-1vw"/>
|
||||
<constraint firstItem="D08-JZ-OXx" firstAttribute="leading" secondItem="Tms-jW-A6w" secondAttribute="trailing" constant="8" symbolic="YES" id="loS-n1-u0i"/>
|
||||
<constraint firstItem="Tms-jW-A6w" firstAttribute="top" secondItem="0dz-eB-6XG" secondAttribute="top" constant="15" id="lxW-2I-OPg"/>
|
||||
<constraint firstItem="0dz-eB-6XG" firstAttribute="bottom" secondItem="Zz9-ug-cmp" secondAttribute="bottom" constant="8" id="qgN-YF-KQn"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<outlet property="articleDate" destination="Kvo-fg-kta" id="62k-rs-rkx"/>
|
||||
<outlet property="articleTitle" destination="D08-JZ-OXx" id="eCe-Sq-wZT"/>
|
||||
<outlet property="authorByLine" destination="M4A-5J-4Kd" id="kEh-Eb-aws"/>
|
||||
<outlet property="iconView" destination="Tms-jW-A6w" id="zNa-5w-F9i"/>
|
||||
<outlet property="indicatorView" destination="bWD-9m-Fch" id="sCP-1M-XMa"/>
|
||||
<outlet property="metaDataStackView" destination="Zz9-ug-cmp" id="YbQ-74-82M"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="Tc9-Yc-Fvc" id="bmO-43-oeR"/>
|
||||
<outlet property="delegate" destination="Tc9-Yc-Fvc" id="CaQ-le-art"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" translucent="NO" prompted="NO"/>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="cJV-OK-IlX" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="3065" y="151"/>
|
||||
</scene>
|
||||
<!--About-->
|
||||
<scene sceneID="pWd-ql-XAA">
|
||||
<objects>
|
||||
@@ -730,109 +947,6 @@
|
||||
</objects>
|
||||
<point key="canvasLocation" x="2388" y="151"/>
|
||||
</scene>
|
||||
<!--Timeline Layout-->
|
||||
<scene sceneID="XRu-Jc-bbU">
|
||||
<objects>
|
||||
<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">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="746"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Q4t-3M-goU">
|
||||
<rect key="frame" x="20" y="56" width="374" height="44"/>
|
||||
<subviews>
|
||||
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="1" maxValue="3" continuous="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AW6-CH-AXP" customClass="TickMarkSlider" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="5" width="334" height="34"/>
|
||||
<color key="tintColor" name="secondaryAccentColor"/>
|
||||
<color key="thumbTintColor" name="primaryAccentColor"/>
|
||||
<connections>
|
||||
<action selector="iconSizeChanged:" destination="amD-xZ-U3A" eventType="valueChanged" id="6sx-Q2-1bm"/>
|
||||
</connections>
|
||||
</slider>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="tableCellGroupedBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="AW6-CH-AXP" firstAttribute="centerY" secondItem="Q4t-3M-goU" secondAttribute="centerY" id="2tx-UF-RkW"/>
|
||||
<constraint firstAttribute="trailing" secondItem="AW6-CH-AXP" secondAttribute="trailing" constant="20" symbolic="YES" id="948-8l-hpY"/>
|
||||
<constraint firstItem="AW6-CH-AXP" firstAttribute="leading" secondItem="Q4t-3M-goU" secondAttribute="leading" constant="20" symbolic="YES" id="9wL-uE-1ow"/>
|
||||
<constraint firstAttribute="height" constant="44" id="DeI-vy-rvH"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ICON SIZE" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VLq-TU-3d6">
|
||||
<rect key="frame" x="40" y="32" width="64" height="16"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/>
|
||||
<color key="textColor" systemColor="secondaryLabelColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="NUMBER OF LINES" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mER-Fl-iHI">
|
||||
<rect key="frame" x="40" y="132" width="116" height="16"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/>
|
||||
<color key="textColor" systemColor="secondaryLabelColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oQi-VX-CMV">
|
||||
<rect key="frame" x="20" y="156" width="374" height="44"/>
|
||||
<subviews>
|
||||
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="1" maxValue="6" continuous="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AIu-s5-Hvq" customClass="TickMarkSlider" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="5" width="334" height="34"/>
|
||||
<color key="tintColor" name="secondaryAccentColor"/>
|
||||
<color key="thumbTintColor" name="primaryAccentColor"/>
|
||||
<connections>
|
||||
<action selector="numberOfLinesChanged:" destination="amD-xZ-U3A" eventType="valueChanged" id="loq-Ao-Zl0"/>
|
||||
</connections>
|
||||
</slider>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="tableCellGroupedBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="DUy-3j-ouM"/>
|
||||
<constraint firstAttribute="trailing" secondItem="AIu-s5-Hvq" secondAttribute="trailing" constant="20" symbolic="YES" id="Gca-aa-lpE"/>
|
||||
<constraint firstItem="AIu-s5-Hvq" firstAttribute="centerY" secondItem="oQi-VX-CMV" secondAttribute="centerY" id="TEJ-Ft-Sbd"/>
|
||||
<constraint firstItem="AIu-s5-Hvq" firstAttribute="leading" secondItem="oQi-VX-CMV" secondAttribute="leading" constant="20" symbolic="YES" id="hss-h1-hJx"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ou4-Yv-dXA">
|
||||
<rect key="frame" x="57" y="232" width="300" height="128"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="300" id="BfC-yc-CAa"/>
|
||||
<constraint firstAttribute="height" constant="128" id="wxz-ZX-8fe"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<segue destination="vZY-Cd-RuD" kind="embed" id="aiA-vf-fq0"/>
|
||||
</connections>
|
||||
</containerView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="KNc-Rk-2DX"/>
|
||||
<color key="backgroundColor" systemColor="systemGroupedBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Q4t-3M-goU" firstAttribute="leading" secondItem="KNc-Rk-2DX" secondAttribute="leading" constant="20" id="I4p-hM-gHL"/>
|
||||
<constraint firstItem="oQi-VX-CMV" firstAttribute="leading" secondItem="KNc-Rk-2DX" secondAttribute="leading" constant="20" id="IWG-G9-AD9"/>
|
||||
<constraint firstItem="Ou4-Yv-dXA" firstAttribute="centerX" secondItem="2Fb-t4-5QE" secondAttribute="centerX" id="Ivk-nj-TCU"/>
|
||||
<constraint firstItem="KNc-Rk-2DX" firstAttribute="trailing" secondItem="oQi-VX-CMV" secondAttribute="trailing" constant="20" id="MOh-yf-Geq"/>
|
||||
<constraint firstItem="Q4t-3M-goU" firstAttribute="top" secondItem="VLq-TU-3d6" secondAttribute="bottom" constant="8" id="jNT-qc-8Jl"/>
|
||||
<constraint firstItem="Q4t-3M-goU" firstAttribute="leading" secondItem="VLq-TU-3d6" secondAttribute="leading" constant="-20" id="n49-GK-LkO"/>
|
||||
<constraint firstItem="mER-Fl-iHI" firstAttribute="top" secondItem="Q4t-3M-goU" secondAttribute="bottom" constant="32" id="nph-Vn-tuP"/>
|
||||
<constraint firstItem="Ou4-Yv-dXA" firstAttribute="top" secondItem="oQi-VX-CMV" secondAttribute="bottom" constant="32" id="v6e-DF-DcX"/>
|
||||
<constraint firstItem="KNc-Rk-2DX" firstAttribute="trailing" secondItem="Q4t-3M-goU" secondAttribute="trailing" constant="20" id="vor-kD-wNk"/>
|
||||
<constraint firstItem="oQi-VX-CMV" firstAttribute="top" secondItem="mER-Fl-iHI" secondAttribute="bottom" constant="8" id="xb9-ti-Ix9"/>
|
||||
<constraint firstItem="VLq-TU-3d6" firstAttribute="top" secondItem="KNc-Rk-2DX" secondAttribute="top" constant="32" id="yHc-GQ-FUD"/>
|
||||
<constraint firstItem="oQi-VX-CMV" firstAttribute="leading" secondItem="mER-Fl-iHI" secondAttribute="leading" constant="-20" id="yMU-8z-2Ie"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" translucent="NO" prompted="NO"/>
|
||||
<connections>
|
||||
<outlet property="iconSizeModernSlider" destination="AW6-CH-AXP" id="kxx-rd-c0k"/>
|
||||
<outlet property="iconSizeSliderContainerView" destination="Q4t-3M-goU" id="dWJ-oN-ogt"/>
|
||||
<outlet property="numberOfLinesModernSlider" destination="AIu-s5-Hvq" id="yWS-HY-X9a"/>
|
||||
<outlet property="numberOfLinesSliderContainerView" destination="oQi-VX-CMV" id="tYs-Il-t90"/>
|
||||
<outlet property="previewContainerView" destination="Ou4-Yv-dXA" id="8qX-fe-lgj"/>
|
||||
<outlet property="previewHeightConstraint" destination="wxz-ZX-8fe" id="jFw-Zn-L5i"/>
|
||||
<outlet property="previewWidthConstraint" destination="BfC-yc-CAa" id="Bc6-qb-ge8"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iNo-Vj-YZx" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="3072" y="151"/>
|
||||
</scene>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="Ezn-Ny-zye">
|
||||
<objects>
|
||||
@@ -849,46 +963,6 @@
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-454" y="152"/>
|
||||
</scene>
|
||||
<!--Timeline Preview Table View Controller-->
|
||||
<scene sceneID="k4U-0u-Fgv">
|
||||
<objects>
|
||||
<viewController id="vZY-Cd-RuD" customClass="TimelinePreviewTableViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="xMG-o1-VfV">
|
||||
<rect key="frame" x="0.0" y="0.0" width="300" height="128"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="7do-cs-DNM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="300" height="128"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" id="Zaq-yo-L5h" customClass="MainTimelineTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="50" width="300" height="43.5"/>
|
||||
<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">
|
||||
<rect key="frame" x="0.0" y="0.0" width="300" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
</tableView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="XPF-1A-UKw"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="7do-cs-DNM" firstAttribute="top" secondItem="xMG-o1-VfV" secondAttribute="top" id="Z1O-Z1-O7s"/>
|
||||
<constraint firstAttribute="trailing" secondItem="7do-cs-DNM" secondAttribute="trailing" id="cOE-fA-hi7"/>
|
||||
<constraint firstAttribute="bottom" secondItem="7do-cs-DNM" secondAttribute="bottom" id="eh9-tn-F3u"/>
|
||||
<constraint firstItem="7do-cs-DNM" firstAttribute="leading" secondItem="xMG-o1-VfV" secondAttribute="leading" id="kW5-pQ-FCx"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="tableView" destination="7do-cs-DNM" id="A8q-7w-LCQ"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Oq6-5f-Oa7" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="3071" y="617"/>
|
||||
</scene>
|
||||
<!--Article Themes-->
|
||||
<scene sceneID="1mT-fg-ezs">
|
||||
<objects>
|
||||
@@ -973,9 +1047,6 @@
|
||||
<namedColor name="primaryAccentColor">
|
||||
<color red="0.031372549019607843" green="0.41568627450980394" blue="0.93333333333333335" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</namedColor>
|
||||
<namedColor name="secondaryAccentColor">
|
||||
<color red="0.031372549019607843" green="0.41568627450980394" blue="0.93333333333333335" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</namedColor>
|
||||
<systemColor name="groupTableViewBackgroundColor">
|
||||
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
@@ -983,13 +1054,10 @@
|
||||
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
<systemColor name="secondaryLabelColor">
|
||||
<color red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<color red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemGroupedBackgroundColor">
|
||||
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="tableCellGroupedBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
|
||||
@@ -196,7 +196,7 @@ class SettingsViewController: UITableViewController {
|
||||
case 3:
|
||||
switch indexPath.row {
|
||||
case 3:
|
||||
let timeline = UIStoryboard.settings.instantiateController(ofType: TimelineCustomizerViewController.self)
|
||||
let timeline = UIStoryboard.settings.instantiateController(ofType: ModernTimelineCustomizerTableViewController.self)
|
||||
self.navigationController?.pushViewController(timeline, animated: true)
|
||||
default:
|
||||
break
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
//
|
||||
// TimelineCustomizerViewController.swift
|
||||
// NetNewsWire-iOS
|
||||
//
|
||||
// Created by Maurice Parker on 11/8/19.
|
||||
// Copyright © 2019 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class TimelineCustomizerViewController: UIViewController {
|
||||
|
||||
@IBOutlet weak var iconSizeSliderContainerView: UIView!
|
||||
@IBOutlet weak var iconSizeModernSlider: UISlider!
|
||||
|
||||
@IBOutlet weak var numberOfLinesSliderContainerView: UIView!
|
||||
@IBOutlet weak var numberOfLinesModernSlider: UISlider!
|
||||
|
||||
@IBOutlet weak var previewWidthConstraint: NSLayoutConstraint!
|
||||
@IBOutlet weak var previewHeightConstraint: NSLayoutConstraint!
|
||||
|
||||
@IBOutlet weak var previewContainerView: UIView!
|
||||
var previewController: TimelinePreviewTableViewController {
|
||||
return children.first as! TimelinePreviewTableViewController
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
iconSizeModernSlider.minimumValue = 1
|
||||
iconSizeModernSlider.maximumValue = 3
|
||||
iconSizeModernSlider.trackConfiguration = .init(allowsTickValuesOnly: true, numberOfTicks: 3)
|
||||
iconSizeModernSlider.value = Float(AppDefaults.shared.timelineIconSize.rawValue)
|
||||
iconSizeSliderContainerView.layer.cornerRadius = 10
|
||||
|
||||
numberOfLinesModernSlider.minimumValue = 1
|
||||
numberOfLinesModernSlider.maximumValue = 6
|
||||
numberOfLinesModernSlider.trackConfiguration = .init(allowsTickValuesOnly: true, numberOfTicks: 6)
|
||||
numberOfLinesModernSlider.value = Float(AppDefaults.shared.timelineNumberOfLines)
|
||||
numberOfLinesSliderContainerView.layer.cornerRadius = 10
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
updatePreviewBorder()
|
||||
updatePreview()
|
||||
}
|
||||
|
||||
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
||||
updatePreviewBorder()
|
||||
updatePreview()
|
||||
}
|
||||
|
||||
@IBAction func iconSizeChanged(_ sender: Any) {
|
||||
guard let iconSize = IconSize(rawValue: Int(iconSizeModernSlider.value.rounded())) else { return }
|
||||
AppDefaults.shared.timelineIconSize = iconSize
|
||||
updatePreview()
|
||||
}
|
||||
|
||||
@IBAction func numberOfLinesChanged(_ sender: Any) {
|
||||
AppDefaults.shared.timelineNumberOfLines = Int(numberOfLinesModernSlider.value.rounded())
|
||||
updatePreview()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private extension TimelineCustomizerViewController {
|
||||
|
||||
func updatePreview() {
|
||||
let previewWidth: CGFloat = {
|
||||
if traitCollection.userInterfaceIdiom == .phone {
|
||||
return view.bounds.width
|
||||
} else {
|
||||
return view.bounds.width / 1.5
|
||||
}
|
||||
}()
|
||||
|
||||
previewWidthConstraint.constant = previewWidth
|
||||
previewHeightConstraint.constant = previewController.heightFor(width: previewWidth)
|
||||
|
||||
previewController.reload()
|
||||
}
|
||||
|
||||
func updatePreviewBorder() {
|
||||
if traitCollection.userInterfaceStyle == .dark {
|
||||
previewContainerView.layer.borderColor = UIColor.black.cgColor
|
||||
previewContainerView.layer.borderWidth = 1
|
||||
} else {
|
||||
previewContainerView.layer.borderWidth = 0
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
//
|
||||
// TimelinePreviewTableViewController.swift
|
||||
// NetNewsWire-iOS
|
||||
//
|
||||
// Created by Maurice Parker on 11/8/19.
|
||||
// Copyright © 2019 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import Articles
|
||||
|
||||
class TimelinePreviewTableViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
|
||||
|
||||
@IBOutlet weak var tableView: UITableView!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
tableView.delegate = self
|
||||
tableView.dataSource = self
|
||||
|
||||
}
|
||||
|
||||
func heightFor(width: CGFloat) -> CGFloat {
|
||||
if UIApplication.shared.preferredContentSizeCategory.isAccessibilityCategory {
|
||||
let layout = MainTimelineAccessibilityCellLayout(width: width, insets: tableView.safeAreaInsets, cellData: prototypeCellData)
|
||||
return layout.height
|
||||
} else {
|
||||
let layout = MainTimelineDefaultCellLayout(width: width, insets: tableView.safeAreaInsets, cellData: prototypeCellData)
|
||||
return layout.height
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Table view data source
|
||||
|
||||
func numberOfSections(in tableView: UITableView) -> Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! MainTimelineTableViewCell
|
||||
cell.cellData = prototypeCellData
|
||||
return cell
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
tableView.selectRow(at: nil, animated: true, scrollPosition: .none)
|
||||
}
|
||||
// MARK: API
|
||||
|
||||
func reload() {
|
||||
tableView.reloadData()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private extension TimelinePreviewTableViewController {
|
||||
|
||||
var prototypeCellData: MainTimelineCellData {
|
||||
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 status = ArticleStatus(articleID: prototypeID, read: false, starred: false, dateArrived: Date())
|
||||
let prototypeArticle = Article(accountID: prototypeID, articleID: prototypeID, webFeedID: prototypeID, uniqueID: prototypeID, title: longTitle, contentHTML: nil, contentText: nil, url: nil, externalURL: nil, summary: nil, imageURL: nil, datePublished: nil, dateModified: nil, authors: nil, status: status)
|
||||
|
||||
let iconImage = IconImage(AppAssets.faviconTemplateImage.withTintColor(AppAssets.secondaryAccentColor))
|
||||
|
||||
return MainTimelineCellData(article: prototypeArticle, showFeedName: .feed, feedName: "Feed Name", byline: nil, iconImage: iconImage, showIcon: true, numberOfLines: AppDefaults.shared.timelineNumberOfLines, iconSize: AppDefaults.shared.timelineIconSize)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user