2019-04-15 22:03:05 +02:00
|
|
|
//
|
2019-09-24 11:29:15 +02:00
|
|
|
// ArticleViewController.swift
|
2019-04-15 22:03:05 +02:00
|
|
|
// NetNewsWire
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 4/8/19.
|
|
|
|
// Copyright © 2019 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import UIKit
|
|
|
|
import WebKit
|
|
|
|
import Account
|
|
|
|
import Articles
|
2019-04-21 13:41:59 +02:00
|
|
|
import SafariServices
|
2019-04-15 22:03:05 +02:00
|
|
|
|
2019-09-24 11:29:15 +02:00
|
|
|
class ArticleViewController: UIViewController {
|
2019-10-12 21:45:44 +02:00
|
|
|
|
2020-01-29 19:30:52 +01:00
|
|
|
typealias State = (extractedArticle: ExtractedArticle?,
|
|
|
|
isShowingExtractedArticle: Bool,
|
|
|
|
articleExtractorButtonState: ArticleExtractorButtonState,
|
|
|
|
windowScrollY: Int)
|
|
|
|
|
2019-08-31 21:30:01 +02:00
|
|
|
@IBOutlet private weak var nextUnreadBarButtonItem: UIBarButtonItem!
|
|
|
|
@IBOutlet private weak var prevArticleBarButtonItem: UIBarButtonItem!
|
|
|
|
@IBOutlet private weak var nextArticleBarButtonItem: UIBarButtonItem!
|
|
|
|
@IBOutlet private weak var readBarButtonItem: UIBarButtonItem!
|
|
|
|
@IBOutlet private weak var starBarButtonItem: UIBarButtonItem!
|
|
|
|
@IBOutlet private weak var actionBarButtonItem: UIBarButtonItem!
|
2020-01-01 00:55:39 +01:00
|
|
|
|
|
|
|
private var pageViewController: UIPageViewController!
|
|
|
|
|
|
|
|
private var currentWebViewController: WebViewController? {
|
|
|
|
return pageViewController?.viewControllers?.first as? WebViewController
|
|
|
|
}
|
2019-11-18 03:20:50 +01:00
|
|
|
|
2019-09-27 21:09:28 +02:00
|
|
|
private var articleExtractorButton: ArticleExtractorButton = {
|
|
|
|
let button = ArticleExtractorButton(type: .system)
|
2019-09-28 00:32:13 +02:00
|
|
|
button.frame = CGRect(x: 0, y: 0, width: 44.0, height: 44.0)
|
2019-09-27 21:09:28 +02:00
|
|
|
button.setImage(AppAssets.articleExtractorOff, for: .normal)
|
|
|
|
return button
|
|
|
|
}()
|
|
|
|
|
2019-09-01 19:43:07 +02:00
|
|
|
weak var coordinator: SceneCoordinator!
|
2019-04-15 22:03:05 +02:00
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
var article: Article? {
|
2019-09-24 02:23:23 +02:00
|
|
|
didSet {
|
2020-01-01 00:55:39 +01:00
|
|
|
if let controller = currentWebViewController, controller.article != article {
|
|
|
|
controller.article = article
|
|
|
|
DispatchQueue.main.async {
|
|
|
|
// You have to set the view controller to clear out the UIPageViewController child controller cache.
|
|
|
|
// You also have to do it in an async call or you will get a strange assertion error.
|
|
|
|
self.pageViewController.setViewControllers([controller], direction: .forward, animated: false, completion: nil)
|
|
|
|
}
|
2019-09-24 02:23:23 +02:00
|
|
|
}
|
2020-01-01 00:55:39 +01:00
|
|
|
updateUI()
|
2019-09-24 23:34:11 +02:00
|
|
|
}
|
|
|
|
}
|
2020-01-29 19:30:52 +01:00
|
|
|
|
|
|
|
var currentState: State? {
|
|
|
|
guard let controller = currentWebViewController else { return nil}
|
|
|
|
return State(extractedArticle: controller.extractedArticle,
|
|
|
|
isShowingExtractedArticle: controller.isShowingExtractedArticle,
|
|
|
|
articleExtractorButtonState: controller.articleExtractorButtonState,
|
|
|
|
windowScrollY: controller.windowScrollY)
|
|
|
|
}
|
|
|
|
|
|
|
|
var restoreState: State?
|
2019-09-24 23:34:11 +02:00
|
|
|
|
2019-09-05 21:37:07 +02:00
|
|
|
private let keyboardManager = KeyboardManager(type: .detail)
|
2019-09-05 04:06:29 +02:00
|
|
|
override var keyCommands: [UIKeyCommand]? {
|
|
|
|
return keyboardManager.keyCommands
|
|
|
|
}
|
|
|
|
|
2019-04-15 22:03:05 +02:00
|
|
|
override func viewDidLoad() {
|
|
|
|
super.viewDidLoad()
|
2019-08-31 21:30:01 +02:00
|
|
|
|
2019-04-23 11:35:48 +02:00
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(unreadCountDidChange(_:)), name: .UnreadCountDidChange, object: nil)
|
2019-04-15 22:03:05 +02:00
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(statusesDidChange(_:)), name: .StatusesDidChange, object: nil)
|
2020-02-05 01:00:26 +01:00
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(contentSizeCategoryDidChange(_:)), name: UIContentSizeCategory.didChangeNotification, object: nil)
|
2019-11-19 02:12:24 +01:00
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil)
|
2019-09-21 17:37:21 +02:00
|
|
|
|
2019-12-26 20:21:56 +01:00
|
|
|
let fullScreenTapZone = UIView()
|
|
|
|
NSLayoutConstraint.activate([
|
|
|
|
fullScreenTapZone.widthAnchor.constraint(equalToConstant: 150),
|
|
|
|
fullScreenTapZone.heightAnchor.constraint(equalToConstant: 44)
|
|
|
|
])
|
|
|
|
fullScreenTapZone.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(didTapNavigationBar)))
|
|
|
|
navigationItem.titleView = fullScreenTapZone
|
|
|
|
|
2019-09-24 23:34:11 +02:00
|
|
|
articleExtractorButton.addTarget(self, action: #selector(toggleArticleExtractor(_:)), for: .touchUpInside)
|
2019-11-06 15:08:08 +01:00
|
|
|
toolbarItems?.insert(UIBarButtonItem(customView: articleExtractorButton), at: 6)
|
2019-09-27 18:20:26 +02:00
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
pageViewController = UIPageViewController(transitionStyle: .scroll, navigationOrientation: .horizontal, options: [:])
|
|
|
|
pageViewController.delegate = self
|
|
|
|
pageViewController.dataSource = self
|
2020-01-17 05:29:10 +01:00
|
|
|
pageViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
2019-11-18 03:20:50 +01:00
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
view.addSubview(pageViewController.view)
|
|
|
|
addChild(pageViewController!)
|
|
|
|
NSLayoutConstraint.activate([
|
|
|
|
view.leadingAnchor.constraint(equalTo: pageViewController.view.leadingAnchor),
|
|
|
|
view.trailingAnchor.constraint(equalTo: pageViewController.view.trailingAnchor),
|
|
|
|
view.topAnchor.constraint(equalTo: pageViewController.view.topAnchor),
|
|
|
|
view.bottomAnchor.constraint(equalTo: pageViewController.view.bottomAnchor)
|
|
|
|
])
|
|
|
|
|
|
|
|
let controller = createWebViewController(article)
|
2020-01-29 19:30:52 +01:00
|
|
|
if let state = restoreState {
|
|
|
|
controller.extractedArticle = state.extractedArticle
|
|
|
|
controller.isShowingExtractedArticle = state.isShowingExtractedArticle
|
|
|
|
controller.articleExtractorButtonState = state.articleExtractorButtonState
|
|
|
|
controller.windowScrollY = state.windowScrollY
|
|
|
|
}
|
2020-01-16 01:28:37 +01:00
|
|
|
articleExtractorButton.buttonState = controller.articleExtractorButtonState
|
2020-01-01 00:55:39 +01:00
|
|
|
pageViewController.setViewControllers([controller], direction: .forward, animated: false, completion: nil)
|
2019-09-21 17:37:21 +02:00
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
updateUI()
|
2019-04-15 22:03:05 +02:00
|
|
|
}
|
|
|
|
|
2019-11-24 21:18:58 +01:00
|
|
|
override func viewWillAppear(_ animated: Bool) {
|
|
|
|
super.viewWillAppear(animated)
|
|
|
|
if AppDefaults.articleFullscreenEnabled {
|
2020-01-01 00:55:39 +01:00
|
|
|
currentWebViewController?.hideBars()
|
2019-11-24 21:18:58 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-19 02:12:24 +01:00
|
|
|
override func viewDidAppear(_ animated: Bool) {
|
|
|
|
super.viewDidAppear(true)
|
|
|
|
coordinator.isArticleViewControllerPending = false
|
|
|
|
}
|
|
|
|
|
2019-11-24 10:42:38 +01:00
|
|
|
override func viewSafeAreaInsetsDidChange() {
|
2019-11-24 20:41:32 +01:00
|
|
|
// This will animate if the show/hide bars animation is happening.
|
|
|
|
view.layoutIfNeeded()
|
2019-11-24 10:42:38 +01:00
|
|
|
}
|
|
|
|
|
2019-04-23 11:35:48 +02:00
|
|
|
func updateUI() {
|
2019-04-15 22:03:05 +02:00
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
guard let article = article else {
|
2019-09-24 23:34:11 +02:00
|
|
|
articleExtractorButton.isEnabled = false
|
2019-04-22 00:42:26 +02:00
|
|
|
nextUnreadBarButtonItem.isEnabled = false
|
|
|
|
prevArticleBarButtonItem.isEnabled = false
|
|
|
|
nextArticleBarButtonItem.isEnabled = false
|
2019-04-15 22:03:05 +02:00
|
|
|
readBarButtonItem.isEnabled = false
|
|
|
|
starBarButtonItem.isEnabled = false
|
|
|
|
actionBarButtonItem.isEnabled = false
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2019-07-06 00:45:39 +02:00
|
|
|
nextUnreadBarButtonItem.isEnabled = coordinator.isAnyUnreadAvailable
|
|
|
|
prevArticleBarButtonItem.isEnabled = coordinator.isPrevArticleAvailable
|
|
|
|
nextArticleBarButtonItem.isEnabled = coordinator.isNextArticleAvailable
|
2019-04-22 00:42:26 +02:00
|
|
|
|
2019-09-24 23:34:11 +02:00
|
|
|
articleExtractorButton.isEnabled = true
|
2019-04-15 22:03:05 +02:00
|
|
|
readBarButtonItem.isEnabled = true
|
|
|
|
starBarButtonItem.isEnabled = true
|
|
|
|
actionBarButtonItem.isEnabled = true
|
|
|
|
|
2020-01-09 22:38:25 +01:00
|
|
|
if article.status.read {
|
|
|
|
readBarButtonItem.image = AppAssets.circleOpenImage
|
2020-02-18 22:49:29 +01:00
|
|
|
readBarButtonItem.isEnabled = article.isAvailableToMarkUnread
|
2020-01-09 22:38:25 +01:00
|
|
|
readBarButtonItem.accLabelText = NSLocalizedString("Mark Article Unread", comment: "Mark Article Unread")
|
|
|
|
} else {
|
|
|
|
readBarButtonItem.image = AppAssets.circleClosedImage
|
2020-02-18 22:49:29 +01:00
|
|
|
readBarButtonItem.isEnabled = true
|
2020-01-09 22:38:25 +01:00
|
|
|
readBarButtonItem.accLabelText = NSLocalizedString("Selected - Mark Article Unread", comment: "Selected - Mark Article Unread")
|
|
|
|
}
|
2019-04-15 22:03:05 +02:00
|
|
|
|
2020-01-09 22:38:25 +01:00
|
|
|
if article.status.starred {
|
|
|
|
starBarButtonItem.image = AppAssets.starClosedImage
|
|
|
|
starBarButtonItem.accLabelText = NSLocalizedString("Selected - Star Article", comment: "Selected - Star Article")
|
|
|
|
} else {
|
|
|
|
starBarButtonItem.image = AppAssets.starOpenImage
|
|
|
|
starBarButtonItem.accLabelText = NSLocalizedString("Star Article", comment: "Star Article")
|
|
|
|
}
|
2019-04-15 22:03:05 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-04-23 11:35:48 +02:00
|
|
|
// MARK: Notifications
|
|
|
|
|
|
|
|
@objc dynamic func unreadCountDidChange(_ notification: Notification) {
|
|
|
|
updateUI()
|
|
|
|
}
|
|
|
|
|
2019-04-15 22:03:05 +02:00
|
|
|
@objc func statusesDidChange(_ note: Notification) {
|
2019-12-17 07:45:59 +01:00
|
|
|
guard let articleIDs = note.userInfo?[Account.UserInfoKey.articleIDs] as? Set<String> else {
|
2019-04-15 22:03:05 +02:00
|
|
|
return
|
|
|
|
}
|
2020-01-01 00:55:39 +01:00
|
|
|
guard let article = article else {
|
2019-12-17 07:45:59 +01:00
|
|
|
return
|
|
|
|
}
|
2020-01-01 00:55:39 +01:00
|
|
|
if articleIDs.contains(article.articleID) {
|
2019-04-23 11:35:48 +02:00
|
|
|
updateUI()
|
2019-04-15 22:03:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-05 01:00:26 +01:00
|
|
|
@objc func contentSizeCategoryDidChange(_ note: Notification) {
|
|
|
|
coordinator.webViewProvider.flushQueue()
|
|
|
|
coordinator.webViewProvider.replenishQueueIfNeeded()
|
|
|
|
if let controller = currentWebViewController {
|
|
|
|
controller.fullReload()
|
|
|
|
self.pageViewController.setViewControllers([controller], direction: .forward, animated: false, completion: nil)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-19 02:12:24 +01:00
|
|
|
@objc func willEnterForeground(_ note: Notification) {
|
2019-11-24 21:49:44 +01:00
|
|
|
// The toolbar will come back on you if you don't hide it again
|
|
|
|
if AppDefaults.articleFullscreenEnabled {
|
2020-01-01 00:55:39 +01:00
|
|
|
currentWebViewController?.hideBars()
|
2019-11-24 21:49:44 +01:00
|
|
|
}
|
2019-11-19 02:12:24 +01:00
|
|
|
}
|
|
|
|
|
2019-04-22 00:42:26 +02:00
|
|
|
// MARK: Actions
|
2019-11-18 03:20:50 +01:00
|
|
|
|
2019-12-26 20:21:56 +01:00
|
|
|
@objc func didTapNavigationBar() {
|
2020-01-01 00:55:39 +01:00
|
|
|
currentWebViewController?.hideBars()
|
2019-12-26 20:21:56 +01:00
|
|
|
}
|
|
|
|
|
2019-11-19 02:12:24 +01:00
|
|
|
@objc func showBars(_ sender: Any) {
|
2020-01-01 00:55:39 +01:00
|
|
|
currentWebViewController?.showBars()
|
2019-11-18 03:20:50 +01:00
|
|
|
}
|
|
|
|
|
2019-09-24 23:34:11 +02:00
|
|
|
@IBAction func toggleArticleExtractor(_ sender: Any) {
|
2020-01-01 00:55:39 +01:00
|
|
|
currentWebViewController?.toggleArticleExtractor()
|
2019-09-24 13:46:53 +02:00
|
|
|
}
|
|
|
|
|
2019-04-22 00:42:26 +02:00
|
|
|
@IBAction func nextUnread(_ sender: Any) {
|
2019-07-06 00:45:39 +02:00
|
|
|
coordinator.selectNextUnread()
|
2019-04-22 00:42:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@IBAction func prevArticle(_ sender: Any) {
|
2019-07-06 18:32:19 +02:00
|
|
|
coordinator.selectPrevArticle()
|
2019-04-22 00:42:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@IBAction func nextArticle(_ sender: Any) {
|
2019-07-06 18:32:19 +02:00
|
|
|
coordinator.selectNextArticle()
|
2019-04-22 00:42:26 +02:00
|
|
|
}
|
|
|
|
|
2019-04-15 22:03:05 +02:00
|
|
|
@IBAction func toggleRead(_ sender: Any) {
|
2019-07-06 18:49:53 +02:00
|
|
|
coordinator.toggleReadForCurrentArticle()
|
2019-04-15 22:03:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@IBAction func toggleStar(_ sender: Any) {
|
2019-09-05 22:43:01 +02:00
|
|
|
coordinator.toggleStarredForCurrentArticle()
|
2019-04-15 22:03:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@IBAction func showActivityDialog(_ sender: Any) {
|
2020-01-01 00:55:39 +01:00
|
|
|
currentWebViewController?.showActivityDialog(popOverBarButtonItem: actionBarButtonItem)
|
2019-04-15 22:03:05 +02:00
|
|
|
}
|
2019-08-25 18:38:04 +02:00
|
|
|
|
2019-09-05 04:06:29 +02:00
|
|
|
// MARK: Keyboard Shortcuts
|
|
|
|
@objc func navigateToTimeline(_ sender: Any?) {
|
|
|
|
coordinator.navigateToTimeline()
|
|
|
|
}
|
|
|
|
|
2019-08-25 18:38:04 +02:00
|
|
|
// MARK: API
|
|
|
|
|
2019-09-05 04:06:29 +02:00
|
|
|
func focus() {
|
2020-01-01 00:55:39 +01:00
|
|
|
currentWebViewController?.focus()
|
2019-09-05 04:06:29 +02:00
|
|
|
}
|
2019-08-25 18:38:04 +02:00
|
|
|
|
2019-09-06 04:14:19 +02:00
|
|
|
func canScrollDown() -> Bool {
|
2020-01-01 00:55:39 +01:00
|
|
|
return currentWebViewController?.canScrollDown() ?? false
|
2019-09-06 04:14:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func scrollPageDown() {
|
2020-01-01 00:55:39 +01:00
|
|
|
currentWebViewController?.scrollPageDown()
|
2019-10-16 23:40:49 +02:00
|
|
|
}
|
|
|
|
|
2019-11-21 01:16:54 +01:00
|
|
|
func fullReload() {
|
2020-01-01 00:55:39 +01:00
|
|
|
currentWebViewController?.fullReload()
|
2019-11-26 02:43:43 +01:00
|
|
|
}
|
|
|
|
|
2020-01-29 19:30:52 +01:00
|
|
|
func stopArticleExtractorIfProcessing() {
|
|
|
|
currentWebViewController?.stopArticleExtractorIfProcessing()
|
|
|
|
}
|
|
|
|
|
2019-11-26 02:43:43 +01:00
|
|
|
}
|
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
// MARK: WebViewControllerDelegate
|
2019-04-15 22:03:05 +02:00
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
extension ArticleViewController: WebViewControllerDelegate {
|
2020-01-21 19:05:47 +01:00
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
func webViewController(_ webViewController: WebViewController, articleExtractorButtonStateDidUpdate buttonState: ArticleExtractorButtonState) {
|
|
|
|
if webViewController === currentWebViewController {
|
|
|
|
articleExtractorButton.buttonState = buttonState
|
2019-04-15 22:03:05 +02:00
|
|
|
}
|
2019-09-21 19:43:15 +02:00
|
|
|
}
|
|
|
|
|
2019-04-15 22:03:05 +02:00
|
|
|
}
|
2019-04-23 14:26:35 +02:00
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
// MARK: UIPageViewControllerDataSource
|
2019-10-12 21:45:44 +02:00
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
extension ArticleViewController: UIPageViewControllerDataSource {
|
2019-10-14 02:41:34 +02:00
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
func pageViewController(_ pageViewController: UIPageViewController, viewControllerBefore viewController: UIViewController) -> UIViewController? {
|
2020-01-26 22:21:04 +01:00
|
|
|
guard let webViewController = viewController as? WebViewController,
|
|
|
|
let currentArticle = webViewController.article,
|
|
|
|
let article = coordinator.findPrevArticle(currentArticle) else {
|
2020-01-01 00:55:39 +01:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return createWebViewController(article)
|
2019-10-16 18:31:20 +02:00
|
|
|
}
|
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
func pageViewController(_ pageViewController: UIPageViewController, viewControllerAfter viewController: UIViewController) -> UIViewController? {
|
2020-01-26 22:21:04 +01:00
|
|
|
guard let webViewController = viewController as? WebViewController,
|
|
|
|
let currentArticle = webViewController.article,
|
|
|
|
let article = coordinator.findNextArticle(currentArticle) else {
|
2020-01-01 00:55:39 +01:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return createWebViewController(article)
|
2019-10-16 18:31:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
// MARK: UIPageViewControllerDelegate
|
2019-10-16 01:08:13 +02:00
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
extension ArticleViewController: UIPageViewControllerDelegate {
|
2019-10-16 01:08:13 +02:00
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
func pageViewController(_ pageViewController: UIPageViewController, didFinishAnimating finished: Bool, previousViewControllers: [UIViewController], transitionCompleted completed: Bool) {
|
|
|
|
guard finished, completed else { return }
|
|
|
|
guard let article = currentWebViewController?.article else { return }
|
2020-02-18 20:08:38 +01:00
|
|
|
|
2020-01-30 00:31:50 +01:00
|
|
|
coordinator.selectArticle(article, animations: [.select, .scroll, .navigation])
|
2020-01-01 00:55:39 +01:00
|
|
|
articleExtractorButton.buttonState = currentWebViewController?.articleExtractorButtonState ?? .off
|
2020-02-18 20:08:38 +01:00
|
|
|
|
|
|
|
previousViewControllers.compactMap({ $0 as? WebViewController }).forEach({ $0.stopWebViewActivity() })
|
2019-10-16 01:08:13 +02:00
|
|
|
}
|
|
|
|
|
2019-10-12 21:45:44 +02:00
|
|
|
}
|
|
|
|
|
2019-09-21 03:33:28 +02:00
|
|
|
// MARK: Private
|
|
|
|
|
2019-09-24 11:29:15 +02:00
|
|
|
private extension ArticleViewController {
|
2019-04-23 14:26:35 +02:00
|
|
|
|
2020-01-01 00:55:39 +01:00
|
|
|
func createWebViewController(_ article: Article?) -> WebViewController {
|
|
|
|
let controller = WebViewController()
|
|
|
|
controller.coordinator = coordinator
|
|
|
|
controller.delegate = self
|
|
|
|
controller.article = article
|
|
|
|
return controller
|
2019-11-18 03:20:50 +01:00
|
|
|
}
|
|
|
|
|
2019-04-23 14:26:35 +02:00
|
|
|
}
|