diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index 43892752c..318ea7547 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -57,12 +57,7 @@ 3B826DCE2385C89600FC1ADB /* AccountsFeedWranglerWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B826DCA2385C84800FC1ADB /* AccountsFeedWranglerWindowController.swift */; }; 49F40DF82335B71000552BF4 /* newsfoot.js in Resources */ = {isa = PBXBuildFile; fileRef = 49F40DEF2335B71000552BF4 /* newsfoot.js */; }; 49F40DF92335B71000552BF4 /* newsfoot.js in Resources */ = {isa = PBXBuildFile; fileRef = 49F40DEF2335B71000552BF4 /* newsfoot.js */; }; - 510289AA2451967500426DDF /* SelectURLBuilderTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 510289A92451967500426DDF /* SelectURLBuilderTableViewController.swift */; }; 510289CD24519A1D00426DDF /* SelectComboTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 510289CC24519A1D00426DDF /* SelectComboTableViewCell.swift */; }; - 510289D02451BA3A00426DDF /* TwitterAdd.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 510289CF2451BA3A00426DDF /* TwitterAdd.storyboard */; }; - 510289D22451BC1F00426DDF /* TwitterSelectTypeTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 510289D12451BC1F00426DDF /* TwitterSelectTypeTableViewController.swift */; }; - 510289D42451BD7B00426DDF /* SelectURLBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 510289D32451BD7B00426DDF /* SelectURLBuilder.swift */; }; - 510289D62451DDD100426DDF /* TwitterSelectAccountTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 510289D52451DDD100426DDF /* TwitterSelectAccountTableViewController.swift */; }; 5102AE6924D17F7C0050839C /* RSCore in Frameworks */ = {isa = PBXBuildFile; productRef = 5102AE6824D17F7C0050839C /* RSCore */; }; 5102AE6A24D17F7C0050839C /* RSCore in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 5102AE6824D17F7C0050839C /* RSCore */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 5102AE6C24D17F7C0050839C /* RSCoreResources in Frameworks */ = {isa = PBXBuildFile; productRef = 5102AE6B24D17F7C0050839C /* RSCoreResources */; }; @@ -91,7 +86,6 @@ 51107747243BEE2500D97C8C /* ExtensionPointPreferencesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51107745243BEE2500D97C8C /* ExtensionPointPreferencesViewController.swift */; }; 5110C37D2373A8D100A9C04F /* InspectorIconHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5110C37C2373A8D100A9C04F /* InspectorIconHeaderView.swift */; }; 51126DA4225FDE2F00722696 /* RSImage-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51126DA3225FDE2F00722696 /* RSImage-Extensions.swift */; }; - 5115CAF42266301400B21BCE /* AddContainerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51121B5A22661FEF00BC0EC1 /* AddContainerViewController.swift */; }; 5117715524E1EA0F00A2A836 /* ArticleExtractorButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5117715424E1EA0F00A2A836 /* ArticleExtractorButton.swift */; }; 5117715624E1EA0F00A2A836 /* ArticleExtractorButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5117715424E1EA0F00A2A836 /* ArticleExtractorButton.swift */; }; 511B9806237DCAC90028BCAA /* UserInfoKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 511B9805237DCAC90028BCAA /* UserInfoKey.swift */; }; @@ -164,7 +158,6 @@ 514A89A5244FD6640085E65D /* AddTwitterFeedWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 514A89A4244FD6640085E65D /* AddTwitterFeedWindowController.swift */; }; 514A89A6244FD6640085E65D /* AddTwitterFeedWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 514A89A4244FD6640085E65D /* AddTwitterFeedWindowController.swift */; }; 514B7C8323205EFB00BAC947 /* RootSplitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 514B7C8223205EFB00BAC947 /* RootSplitViewController.swift */; }; - 514B7D1F23219F3C00BAC947 /* AddControllerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 514B7D1E23219F3C00BAC947 /* AddControllerType.swift */; }; 514C16CE24D2E63F009A3AFA /* Account in Frameworks */ = {isa = PBXBuildFile; productRef = 514C16CD24D2E63F009A3AFA /* Account */; }; 514C16DE24D2EF15009A3AFA /* RSTree in Frameworks */ = {isa = PBXBuildFile; productRef = 514C16DD24D2EF15009A3AFA /* RSTree */; }; 514C16DF24D2EF15009A3AFA /* RSTree in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 514C16DD24D2EF15009A3AFA /* RSTree */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; @@ -210,11 +203,6 @@ 516A093B2360A4A000EAE89B /* SettingsTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 516A093A2360A4A000EAE89B /* SettingsTableViewCell.xib */; }; 516A09402361240900EAE89B /* Account.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 516A093F2361240900EAE89B /* Account.storyboard */; }; 516A09422361248000EAE89B /* Inspector.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 516A09412361248000EAE89B /* Inspector.storyboard */; }; - 516AE600246AF34200731738 /* RedditAdd.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 516AE5FF246AF34100731738 /* RedditAdd.storyboard */; }; - 516AE602246AF36100731738 /* RedditSelectTypeTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 516AE601246AF36100731738 /* RedditSelectTypeTableViewController.swift */; }; - 516AE604246AF37B00731738 /* RedditSelectAccountTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 516AE603246AF37B00731738 /* RedditSelectAccountTableViewController.swift */; }; - 516AE606246AF3A900731738 /* RedditEnterDetailTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 516AE605246AF3A900731738 /* RedditEnterDetailTableViewController.swift */; }; - 516AE608246AFC9900731738 /* RedditSelectSortTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 516AE607246AFC9900731738 /* RedditSelectSortTableViewController.swift */; }; 516AE9B32371C372007DEEAA /* MasterFeedTableViewSectionHeaderLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 516AE9B22371C372007DEEAA /* MasterFeedTableViewSectionHeaderLayout.swift */; }; 516AE9DF2372269A007DEEAA /* IconImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 516AE9DE2372269A007DEEAA /* IconImage.swift */; }; 516AE9E02372269A007DEEAA /* IconImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 516AE9DE2372269A007DEEAA /* IconImage.swift */; }; @@ -402,7 +390,6 @@ 51BC4AFF247277E0000A6ED8 /* URL-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51BC4ADD247277DF000A6ED8 /* URL-Extensions.swift */; }; 51BC4B00247277E0000A6ED8 /* URL-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51BC4ADD247277DF000A6ED8 /* URL-Extensions.swift */; }; 51BC4B01247277E0000A6ED8 /* URL-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51BC4ADD247277DF000A6ED8 /* URL-Extensions.swift */; }; - 51BEB22D2451E8340066DEDD /* TwitterEnterDetailTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51BEB22C2451E8340066DEDD /* TwitterEnterDetailTableViewController.swift */; }; 51C0515E24A77DF800194D5E /* MainApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C0513624A77DF700194D5E /* MainApp.swift */; }; 51C0515F24A77DF800194D5E /* MainApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C0513624A77DF700194D5E /* MainApp.swift */; }; 51C0516224A77DF800194D5E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 51C0513824A77DF800194D5E /* Assets.xcassets */; }; @@ -1436,11 +1423,9 @@ 3B826DB02385C84800FC1ADB /* AccountsFeedWrangler.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AccountsFeedWrangler.xib; sourceTree = ""; }; 3B826DCA2385C84800FC1ADB /* AccountsFeedWranglerWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountsFeedWranglerWindowController.swift; sourceTree = ""; }; 49F40DEF2335B71000552BF4 /* newsfoot.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = newsfoot.js; sourceTree = ""; }; - 510289A92451967500426DDF /* SelectURLBuilderTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectURLBuilderTableViewController.swift; sourceTree = ""; }; 510289CC24519A1D00426DDF /* SelectComboTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectComboTableViewCell.swift; sourceTree = ""; }; 510289CF2451BA3A00426DDF /* TwitterAdd.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = TwitterAdd.storyboard; sourceTree = ""; }; 510289D12451BC1F00426DDF /* TwitterSelectTypeTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwitterSelectTypeTableViewController.swift; sourceTree = ""; }; - 510289D32451BD7B00426DDF /* SelectURLBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectURLBuilder.swift; sourceTree = ""; }; 510289D52451DDD100426DDF /* TwitterSelectAccountTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwitterSelectAccountTableViewController.swift; sourceTree = ""; }; 5103A9972421643300410853 /* blank.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = blank.html; sourceTree = ""; }; 5103A9B324216A4200410853 /* blank.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = blank.html; sourceTree = ""; }; @@ -1458,7 +1443,6 @@ 51107745243BEE2500D97C8C /* ExtensionPointPreferencesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionPointPreferencesViewController.swift; sourceTree = ""; }; 5110C37C2373A8D100A9C04F /* InspectorIconHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectorIconHeaderView.swift; sourceTree = ""; }; 51121AA12265430A00BC0EC1 /* NetNewsWire_iOSapp_target.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = NetNewsWire_iOSapp_target.xcconfig; sourceTree = ""; }; - 51121B5A22661FEF00BC0EC1 /* AddContainerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddContainerViewController.swift; sourceTree = ""; }; 51126DA3225FDE2F00722696 /* RSImage-Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RSImage-Extensions.swift"; sourceTree = ""; }; 5117715424E1EA0F00A2A836 /* ArticleExtractorButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArticleExtractorButton.swift; sourceTree = ""; }; 511B9805237DCAC90028BCAA /* UserInfoKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserInfoKey.swift; sourceTree = ""; }; @@ -1509,7 +1493,6 @@ 514A8980244FD63F0085E65D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Mac/Base.lproj/AddTwitterFeedSheet.xib; sourceTree = SOURCE_ROOT; }; 514A89A4244FD6640085E65D /* AddTwitterFeedWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AddTwitterFeedWindowController.swift; path = AddFeed/AddTwitterFeedWindowController.swift; sourceTree = ""; }; 514B7C8223205EFB00BAC947 /* RootSplitViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootSplitViewController.swift; sourceTree = ""; }; - 514B7D1E23219F3C00BAC947 /* AddControllerType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddControllerType.swift; sourceTree = ""; }; 514E6BD924ACEA0400AC6F6E /* TimelineItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineItemView.swift; sourceTree = ""; }; 514E6BFE24AD255D00AC6F6E /* PreviewArticles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreviewArticles.swift; sourceTree = ""; }; 514E6C0124AD29A300AC6F6E /* TimelineItemStatusView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineItemStatusView.swift; sourceTree = ""; }; @@ -2742,15 +2725,11 @@ children = ( 51C452822265093600C03939 /* Add.storyboard */, 51E4397F23805EBC00015C31 /* AddComboTableViewCell.swift */, - 51121B5A22661FEF00BC0EC1 /* AddContainerViewController.swift */, - 514B7D1E23219F3C00BAC947 /* AddControllerType.swift */, 51C4528B2265095F00C03939 /* AddFolderViewController.swift */, 51E43961238037C400015C31 /* AddWebFeedFolderViewController.swift */, 51E36E70239D6610006F47A5 /* AddWebFeedSelectFolderTableViewCell.swift */, 51C452842265093600C03939 /* AddWebFeedViewController.swift */, 510289CC24519A1D00426DDF /* SelectComboTableViewCell.swift */, - 510289D32451BD7B00426DDF /* SelectURLBuilder.swift */, - 510289A92451967500426DDF /* SelectURLBuilderTableViewController.swift */, 51E36E8B239D6765006F47A5 /* AddWebFeedSelectFolderTableViewCell.xib */, 516AE5DD246AF2DD00731738 /* Reddit */, 510289CE2451BA1E00426DDF /* Twitter */, @@ -4149,10 +4128,8 @@ 516A09422361248000EAE89B /* Inspector.storyboard in Resources */, 5103A9B424216A4200410853 /* blank.html in Resources */, 84C9FCA42262A1B800D921D6 /* LaunchScreenPhone.storyboard in Resources */, - 510289D02451BA3A00426DDF /* TwitterAdd.storyboard in Resources */, 51F85BEB22724CB600C787DC /* About.rtf in Resources */, 516A093B2360A4A000EAE89B /* SettingsTableViewCell.xib in Resources */, - 516AE600246AF34200731738 /* RedditAdd.storyboard in Resources */, 511D43D1231FA62800FB1562 /* SidebarKeyboardShortcuts.plist in Resources */, 516A09402361240900EAE89B /* Account.storyboard in Resources */, 51C452AB22650DC600C03939 /* template.html in Resources */, @@ -4877,18 +4854,15 @@ 5183CCDA226E31A50010922C /* NonIntrinsicImageView.swift in Sources */, B2B80778239C4C7000F191E0 /* RSImage-AppIcons.swift in Sources */, 518ED21D23D0F26000E0A862 /* UIViewController-Extensions.swift in Sources */, - 516AE604246AF37B00731738 /* RedditSelectAccountTableViewController.swift in Sources */, 51A9A5F52380F6A60033AADF /* ModalNavigationController.swift in Sources */, 51EAED96231363EF00A9EEE3 /* NonIntrinsicButton.swift in Sources */, 51C4527B2265091600C03939 /* MasterUnreadIndicatorView.swift in Sources */, - 516AE608246AFC9900731738 /* RedditSelectSortTableViewController.swift in Sources */, 5186A635235EF3A800C97195 /* VibrantLabel.swift in Sources */, 51F85BF92274AA7B00C787DC /* UIBarButtonItem-Extensions.swift in Sources */, 51B62E68233186730085F949 /* IconView.swift in Sources */, 51C45296226509D300C03939 /* OPMLExporter.swift in Sources */, 51C45291226509C800C03939 /* SmartFeed.swift in Sources */, 51C452A722650A3D00C03939 /* RSImage-Extensions.swift in Sources */, - 516AE606246AF3A900731738 /* RedditEnterDetailTableViewController.swift in Sources */, 511B9807237DCAC90028BCAA /* UserInfoKey.swift in Sources */, 51C45269226508F600C03939 /* MasterFeedTableViewCell.swift in Sources */, 51F85BFD2275DCA800C787DC /* SingleLineUILabelSizer.swift in Sources */, @@ -4900,7 +4874,6 @@ 513146B2235A81A400387FDC /* AddWebFeedIntentHandler.swift in Sources */, 51D87EE12311D34700E63F03 /* ActivityType.swift in Sources */, 51C452772265091600C03939 /* MultilineUILabelSizer.swift in Sources */, - 510289D22451BC1F00426DDF /* TwitterSelectTypeTableViewController.swift in Sources */, 51C452A522650A2D00C03939 /* SmallIconProvider.swift in Sources */, 51AB8AB323B7F4C6008F147D /* WebViewController.swift in Sources */, 516A09392360A2AE00EAE89B /* SettingsComboTableViewCell.swift in Sources */, @@ -4938,11 +4911,9 @@ 51B5C87723F22B8200032075 /* ExtensionContainers.swift in Sources */, 51C45292226509C800C03939 /* TodayFeedDelegate.swift in Sources */, 51C452A222650A1900C03939 /* RSHTMLMetadata+Extension.swift in Sources */, - 514B7D1F23219F3C00BAC947 /* AddControllerType.swift in Sources */, 51B5C87B23F2317700032075 /* ExtensionFeedAddRequest.swift in Sources */, 51627A93238A3836007B3B4B /* CroppingPreviewParameters.swift in Sources */, 512AF9DD236F05230066F8BE /* InteractiveLabel.swift in Sources */, - 510289AA2451967500426DDF /* SelectURLBuilderTableViewController.swift in Sources */, 51E3EB3D229AB08300645299 /* ErrorHandler.swift in Sources */, 5183CCE5226F4DFA0010922C /* RefreshInterval.swift in Sources */, 51C4529D22650A1000C03939 /* FaviconURLFinder.swift in Sources */, @@ -4961,7 +4932,6 @@ 51C4529922650A0000C03939 /* ArticleStylesManager.swift in Sources */, 51EF0F802277A8330050506E /* MasterTimelineCellLayout.swift in Sources */, 51F85BF722749FA100C787DC /* UIFont-Extensions.swift in Sources */, - 510289D42451BD7B00426DDF /* SelectURLBuilder.swift in Sources */, 51C452AF2265108300C03939 /* ArticleArray.swift in Sources */, 51C4528E2265099C00C03939 /* SmartFeedsController.swift in Sources */, 51C9DE5823EA2EF4003D5A6D /* WrapperScriptMessageHandler.swift in Sources */, @@ -4975,14 +4945,12 @@ 515A517B243E90260089E588 /* ExtensionPoint.swift in Sources */, 51C4529C22650A1000C03939 /* SingleFaviconDownloader.swift in Sources */, 51E595A6228CC36500FCC42B /* ArticleStatusSyncTimer.swift in Sources */, - 516AE602246AF36100731738 /* RedditSelectTypeTableViewController.swift in Sources */, 51F9F3F723DF6DB200A314FD /* ArticleIconSchemeHandler.swift in Sources */, 512AF9C2236ED52C0066F8BE /* ImageHeaderView.swift in Sources */, 515A5181243E90260089E588 /* ExtensionPointIdentifer.swift in Sources */, 51A1699F235E10D700EB091F /* AboutViewController.swift in Sources */, 51C45290226509C100C03939 /* PseudoFeed.swift in Sources */, 51C452A922650DC600C03939 /* ArticleRenderer.swift in Sources */, - 5115CAF42266301400B21BCE /* AddContainerViewController.swift in Sources */, 51C45297226509E300C03939 /* DefaultFeedsImporter.swift in Sources */, 512E094D2268B8AB00BDCFDD /* DeleteCommand.swift in Sources */, 5110C37D2373A8D100A9C04F /* InspectorIconHeaderView.swift in Sources */, @@ -5022,10 +4990,8 @@ 519E743D22C663F900A78E47 /* SceneDelegate.swift in Sources */, FFD43E412340F488009E5CA3 /* MarkAsReadAlertController.swift in Sources */, 51C452A322650A1E00C03939 /* HTMLMetadataDownloader.swift in Sources */, - 510289D62451DDD100426DDF /* TwitterSelectAccountTableViewController.swift in Sources */, 51C4528D2265095F00C03939 /* AddFolderViewController.swift in Sources */, 51DC37072402153E0095D371 /* UpdateSelectionOperation.swift in Sources */, - 51BEB22D2451E8340066DEDD /* TwitterEnterDetailTableViewController.swift in Sources */, 51C452782265091600C03939 /* MasterTimelineCellData.swift in Sources */, 5148F4552336DB7000F8CD8B /* MasterTimelineTitleView.swift in Sources */, 515A517C243E90260089E588 /* ExtensionPointManager.swift in Sources */, diff --git a/iOS/Add/Add.storyboard b/iOS/Add/Add.storyboard index 15a4958ba..b05147e75 100644 --- a/iOS/Add/Add.storyboard +++ b/iOS/Add/Add.storyboard @@ -1,17 +1,17 @@ - + - + + - - + @@ -30,19 +30,10 @@ - - - @@ -58,7 +49,7 @@ - + @@ -106,26 +97,47 @@ + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - + @@ -141,7 +153,7 @@ - + @@ -237,116 +249,28 @@ - + - + - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -363,7 +287,7 @@ - + @@ -435,11 +359,23 @@ - + + + + + + + + + + + + + @@ -447,90 +383,24 @@ - - + + - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - diff --git a/iOS/Add/AddContainerViewController.swift b/iOS/Add/AddContainerViewController.swift deleted file mode 100644 index 0c521910b..000000000 --- a/iOS/Add/AddContainerViewController.swift +++ /dev/null @@ -1,170 +0,0 @@ -// -// AddContainerViewController.swift -// NetNewsWire -// -// Created by Maurice Parker on 4/16/19. -// Copyright © 2019 Ranchero Software, LLC. All rights reserved. -// - -import UIKit - -protocol AddContainerViewControllerChild: UIViewController { - var delegate: AddContainerViewControllerChildDelegate? {get set} - func cancel() - func add() -} - -protocol AddContainerViewControllerChildDelegate: UIViewController { - func readyToAdd(state: Bool) - func processingDidBegin() - func processingDidCancel() - func processingDidEnd() -} - -class AddContainerViewController: UIViewController { - - static let preferredContentSizeForFormSheetDisplay = CGSize(width: 460.0, height: 400.0) - - @IBOutlet weak var cancelButton: UIBarButtonItem! - @IBOutlet weak var activityIndicatorView: UIActivityIndicatorView! - @IBOutlet weak var addButton: UIBarButtonItem! - @IBOutlet weak var typeSelectorContainer: UIView! - @IBOutlet weak var typeSelectorSegmentedControl: UISegmentedControl! - @IBOutlet weak var containerView: UIView! - - private var currentViewController: AddContainerViewControllerChild? - - var initialControllerType: AddControllerType? - var initialFeed: String? - var initialFeedName: String? - - override func viewDidLoad() { - - super.viewDidLoad() - activityIndicatorView.color = UIColor.label - activityIndicatorView.isHidden = true - - typeSelectorContainer.layer.cornerRadius = 10 - typeSelectorSegmentedControl.selectedSegmentIndex = initialControllerType?.rawValue ?? 0 - switch initialControllerType { - case .feed: - switchToFeed() - case .folder: - switchToFolder() - default: - assertionFailure() - } - - } - - @IBAction func typeSelectorChanged(_ sender: UISegmentedControl) { - switch sender.selectedSegmentIndex { - case 0: - switchToFeed() - default: - switchToFolder() - } - } - - @IBAction func cancel(_ sender: Any) { - currentViewController?.cancel() - dismiss(animated: true) - } - - @IBAction func add(_ sender: Any) { - currentViewController?.add() - } - -} - -extension AddContainerViewController: AddContainerViewControllerChildDelegate { - - func readyToAdd(state: Bool) { - addButton.isEnabled = state - } - - func processingDidBegin() { - addButton.isEnabled = false - typeSelectorSegmentedControl.isEnabled = false - activityIndicatorView.isHidden = false - activityIndicatorView.startAnimating() - } - - func processingDidCancel() { - addButton.isEnabled = true - typeSelectorSegmentedControl.isEnabled = true - activityIndicatorView.isHidden = true - activityIndicatorView.stopAnimating() - } - - func processingDidEnd() { - dismiss(animated: true) - } - -} - -private extension AddContainerViewController { - - func switchToFeed() { - - guard !(currentViewController is AddWebFeedViewController) else { - return - } - - navigationItem.title = NSLocalizedString("Add Web Feed", comment: "Add Web Feed") - resetUI() - - let addFeedController = UIStoryboard.add.instantiateController(ofType: AddWebFeedViewController.self) - addFeedController.initialFeed = initialFeed - addFeedController.initialFeedName = initialFeedName - - displayContentController(addFeedController) - - } - - func switchToFolder() { - - guard !(currentViewController is AddFolderViewController) else { - return - } - - navigationItem.title = NSLocalizedString("Add Folder", comment: "Add Folder") - resetUI() - displayContentController(UIStoryboard.add.instantiateController(ofType: AddFolderViewController.self)) - - } - - func resetUI() { - addButton.isEnabled = false - } - - func displayContentController(_ controller: AddContainerViewControllerChild) { - controller.delegate = self - - if let currentViewController = currentViewController { - - let transition = CATransition() - transition.type = .push - transition.subtype = currentViewController is AddWebFeedViewController ? .fromRight : .fromLeft - containerView.layer.add(transition, forKey: "transition") - - containerView.addChildAndPin(controller.view) - addChild(controller) - controller.didMove(toParent: self) - - currentViewController.willMove(toParent: nil) - currentViewController.view.removeFromSuperview() - currentViewController.removeFromParent() - - } else { - - containerView.addChildAndPin(controller.view) - addChild(controller) - controller.didMove(toParent: self) - - } - - currentViewController = controller - } - -} diff --git a/iOS/Add/AddControllerType.swift b/iOS/Add/AddControllerType.swift deleted file mode 100644 index cf68e97af..000000000 --- a/iOS/Add/AddControllerType.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// AddControllerType.swift -// NetNewsWire-iOS -// -// Created by Maurice Parker on 9/5/19. -// Copyright © 2019 Ranchero Software. All rights reserved. -// - -import Foundation - -enum AddControllerType: Int { - case feed = 0 - case folder = 1 -} diff --git a/iOS/Add/AddFolderViewController.swift b/iOS/Add/AddFolderViewController.swift index 7eebbd69b..528e443c9 100644 --- a/iOS/Add/AddFolderViewController.swift +++ b/iOS/Add/AddFolderViewController.swift @@ -10,12 +10,15 @@ import UIKit import Account import RSCore -class AddFolderViewController: UITableViewController, AddContainerViewControllerChild { +class AddFolderViewController: UITableViewController { + @IBOutlet private weak var addButton: UIBarButtonItem! @IBOutlet private weak var nameTextField: UITextField! @IBOutlet private weak var accountLabel: UILabel! @IBOutlet private weak var accountPickerView: UIPickerView! + static let preferredContentSizeForFormSheetDisplay = CGSize(width: 460.0, height: 400.0) + private var shouldDisplayPicker: Bool { return accounts.count > 1 } @@ -37,10 +40,7 @@ class AddFolderViewController: UITableViewController, AddContainerViewController } } - weak var delegate: AddContainerViewControllerChildDelegate? - override func viewDidLoad() { - super.viewDidLoad() accounts = AccountManager.shared @@ -61,11 +61,9 @@ class AddFolderViewController: UITableViewController, AddContainerViewController accountPickerView.isHidden = true } - // I couldn't figure out the gap at the top of the UITableView, so I took a hammer to it. - tableView.contentInset = UIEdgeInsets(top: -28, left: 0, bottom: 0, right: 0) - NotificationCenter.default.addObserver(self, selector: #selector(textDidChange(_:)), name: UITextField.textDidChangeNotification, object: nameTextField) + nameTextField.becomeFirstResponder() } private func didSelect(_ account: Account) { @@ -73,26 +71,27 @@ class AddFolderViewController: UITableViewController, AddContainerViewController selectedAccount = account } - func cancel() { - delegate?.processingDidEnd() + @IBAction func cancel(_ sender: Any) { + dismiss(animated: true) } - func add() { + @IBAction func add(_ sender: Any) { guard let folderName = nameTextField.text else { return } selectedAccount.addFolder(folderName) { result in switch result { case .success: - self.delegate?.processingDidEnd() + self.dismiss(animated: true) case .failure(let error): self.presentError(error) + self.dismiss(animated: true) } } } @objc func textDidChange(_ note: Notification) { - delegate?.readyToAdd(state: !(nameTextField.text?.isEmpty ?? false)) + addButton.isEnabled = !(nameTextField.text?.isEmpty ?? false) } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { diff --git a/iOS/Add/AddWebFeedViewController.swift b/iOS/Add/AddWebFeedViewController.swift index 99f7e55f2..16f52fc58 100644 --- a/iOS/Add/AddWebFeedViewController.swift +++ b/iOS/Add/AddWebFeedViewController.swift @@ -12,26 +12,30 @@ import RSCore import RSTree import RSParser -class AddWebFeedViewController: UITableViewController, AddContainerViewControllerChild { +class AddWebFeedViewController: UITableViewController { - @IBOutlet private weak var urlTextField: UITextField! + @IBOutlet weak var activityIndicator: UIActivityIndicatorView! + @IBOutlet weak var addButton: UIBarButtonItem! + @IBOutlet weak var urlTextField: UITextField! @IBOutlet weak var urlTextFieldToSuperViewConstraint: NSLayoutConstraint! - @IBOutlet weak var urlBuilderButton: UIButton! - @IBOutlet private weak var nameTextField: UITextField! + @IBOutlet weak var nameTextField: UITextField! + + static let preferredContentSizeForFormSheetDisplay = CGSize(width: 460.0, height: 400.0) private var folderLabel = "" private var userCancelled = false - weak var delegate: AddContainerViewControllerChildDelegate? var initialFeed: String? var initialFeedName: String? var container: Container? override func viewDidLoad() { - super.viewDidLoad() + activityIndicator.isHidden = true + activityIndicator.color = .label + if initialFeed == nil, let urlString = UIPasteboard.general.string { if urlString.mayBeURL { initialFeed = urlString.normalizedURL @@ -43,15 +47,8 @@ class AddWebFeedViewController: UITableViewController, AddContainerViewControlle urlTextField.text = initialFeed urlTextField.delegate = self - if ExtensionPointManager.shared.isTwitterEnabled { - urlTextFieldToSuperViewConstraint.isActive = false - urlTextField.trailingAnchor.constraint(equalTo: urlBuilderButton.leadingAnchor, constant: -8).isActive = true - } else { - urlBuilderButton.isHidden = true - } - if initialFeed != nil { - delegate?.readyToAdd(state: true) + addButton.isEnabled = true } nameTextField.text = initialFeedName @@ -60,40 +57,31 @@ class AddWebFeedViewController: UITableViewController, AddContainerViewControlle if let defaultContainer = AddWebFeedDefaultContainer.defaultContainer { container = defaultContainer } else { - delegate?.readyToAdd(state: false) + addButton.isEnabled = false } updateFolderLabel() - // I couldn't figure out the gap at the top of the UITableView, so I took a hammer to it. - tableView.contentInset = UIEdgeInsets(top: -28, left: 0, bottom: 0, right: 0) - tableView.register(UINib(nibName: "AddWebFeedSelectFolderTableViewCell", bundle: nil), forCellReuseIdentifier: "AddWebFeedSelectFolderTableViewCell") NotificationCenter.default.addObserver(self, selector: #selector(textDidChange(_:)), name: UITextField.textDidChangeNotification, object: urlTextField) - + + if initialFeed == nil { + urlTextField.becomeFirstResponder() + } } - @IBAction func showURLBuilder(_ sender: Any) { - let navController = UIStoryboard.add.instantiateViewController(withIdentifier: "SelectURLBuilderNavViewController") as! UINavigationController - navController.modalPresentationStyle = .currentContext - let selectURLBuilder = navController.topViewController as! SelectURLBuilderTableViewController - selectURLBuilder.delegate = self - present(navController, animated: true) - } - - func cancel() { + @IBAction func cancel(_ sender: Any) { userCancelled = true - delegate?.processingDidCancel() + dismiss(animated: true) } - func add() { + @IBAction func add(_ sender: Any) { let urlString = urlTextField.text ?? "" let normalizedURLString = urlString.normalizedURL guard !normalizedURLString.isEmpty, let url = URL(unicodeString: normalizedURLString) else { - delegate?.processingDidCancel() return } @@ -111,7 +99,9 @@ class AddWebFeedViewController: UITableViewController, AddContainerViewControlle return } - delegate?.processingDidBegin() + addButton.isEnabled = false + activityIndicator.isHidden = false + activityIndicator.startAnimating() let feedName = (nameTextField.text?.isEmpty ?? true) ? nil : nameTextField.text @@ -123,11 +113,13 @@ class AddWebFeedViewController: UITableViewController, AddContainerViewControlle switch result { case .success(let feed): - self.delegate?.processingDidEnd() + self.dismiss(animated: true) NotificationCenter.default.post(name: .UserDidAddFeed, object: self, userInfo: [UserInfoKey.webFeed: feed]) case .failure(let error): + self.addButton.isEnabled = true + self.activityIndicator.isHidden = true + self.activityIndicator.stopAnimating() self.presentError(error) - self.delegate?.processingDidCancel() } } @@ -171,17 +163,6 @@ extension AddWebFeedViewController: AddWebFeedFolderViewControllerDelegate { } } -// MARK: AddWebFeedFolderViewControllerDelegate - -extension AddWebFeedViewController: SelectURLBuilderDelegate { - - func selectURLBuilderDidBuildURL(_ url: URL) { - urlTextField.text = url.absoluteString - updateUI() - } - -} - // MARK: UITextFieldDelegate extension AddWebFeedViewController: UITextFieldDelegate { @@ -198,7 +179,7 @@ extension AddWebFeedViewController: UITextFieldDelegate { private extension AddWebFeedViewController { func updateUI() { - delegate?.readyToAdd(state: urlTextField.text?.mayBeURL ?? false) + addButton.isEnabled = (urlTextField.text?.mayBeURL ?? false) } func updateFolderLabel() { diff --git a/iOS/Add/SelectURLBuilder.swift b/iOS/Add/SelectURLBuilder.swift deleted file mode 100644 index 6d87ccaca..000000000 --- a/iOS/Add/SelectURLBuilder.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// SelectURLBuilder.swift -// NetNewsWire-iOS -// -// Created by Maurice Parker on 4/23/20. -// Copyright © 2020 Ranchero Software. All rights reserved. -// - -import UIKit - -protocol SelectURLBuilderDelegate: class { - func selectURLBuilderDidBuildURL(_ url: URL) -} - -protocol SelectURLBuilder { - var delegate: SelectURLBuilderDelegate? { get set } -} diff --git a/iOS/Add/SelectURLBuilderTableViewController.swift b/iOS/Add/SelectURLBuilderTableViewController.swift deleted file mode 100644 index 1706fac39..000000000 --- a/iOS/Add/SelectURLBuilderTableViewController.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// SelectURLBuilderTableViewController.swift -// NetNewsWire-iOS -// -// Created by Maurice Parker on 4/23/20. -// Copyright © 2020 Ranchero Software. All rights reserved. -// - -import UIKit - -class SelectURLBuilderTableViewController: UITableViewController, SelectURLBuilder { - - weak var delegate: SelectURLBuilderDelegate? - - override func viewDidLoad() { - super.viewDidLoad() - } - - // MARK: - Table view data source - - override func numberOfSections(in tableView: UITableView) -> Int { - return 1 - } - - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return 2 - } - - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCell(withIdentifier: "URLBuilderCell", for: indexPath) as! SelectComboTableViewCell - switch indexPath.row { - case 0: - cell.icon?.image = AppAssets.extensionPointReddit - cell.label?.text = NSLocalizedString("Reddit", comment: "Reddit") - case 1: - cell.icon?.image = AppAssets.extensionPointTwitter - cell.label?.text = NSLocalizedString("Twitter", comment: "Twitter") - default: - break - } - return cell - } - - override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - switch indexPath.row { - case 0: - let redditURLBuilder = UIStoryboard.redditAdd.instantiateInitialViewController() as! RedditSelectTypeTableViewController - redditURLBuilder.delegate = delegate - navigationController?.pushViewController(redditURLBuilder, animated: true) - case 1: - let twitterURLBuilder = UIStoryboard.twitterAdd.instantiateInitialViewController() as! TwitterSelectTypeTableViewController - twitterURLBuilder.delegate = delegate - navigationController?.pushViewController(twitterURLBuilder, animated: true) - default: - break - } - } - - // MARK: Actions - - @IBAction func cancel(_ sender: Any) { - dismiss(animated: true) - } - -} diff --git a/iOS/MasterFeed/MasterFeedViewController.swift b/iOS/MasterFeed/MasterFeedViewController.swift index 0faf32797..3da0867dd 100644 --- a/iOS/MasterFeed/MasterFeedViewController.swift +++ b/iOS/MasterFeed/MasterFeedViewController.swift @@ -394,7 +394,29 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner { } @IBAction func add(_ sender: UIBarButtonItem) { - coordinator.showAdd(.feed) + let title = NSLocalizedString("Add Item", comment: "Add Item") + let alertController = UIAlertController(title: title, message: nil, preferredStyle: .actionSheet) + + let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel") + let cancelAction = UIAlertAction(title: cancelTitle, style: .cancel) + + let addWebFeedActionTitle = NSLocalizedString("Add Web Feed", comment: "Add Web Feed") + let addWebFeedAction = UIAlertAction(title: addWebFeedActionTitle, style: .default) { _ in + self.coordinator.showAddFeed() + } + + let addWebFolderdActionTitle = NSLocalizedString("Add Folder", comment: "Add Folder") + let addWebFolderAction = UIAlertAction(title: addWebFolderdActionTitle, style: .default) { _ in + self.coordinator.showAddFolder() + } + + alertController.addAction(addWebFeedAction) + alertController.addAction(addWebFolderAction) + alertController.addAction(cancelAction) + + alertController.popoverPresentationController?.barButtonItem = sender + + present(alertController, animated: true) } @objc func toggleSectionHeader(_ sender: UITapGestureRecognizer) { diff --git a/iOS/RootSplitViewController.swift b/iOS/RootSplitViewController.swift index 28d9eb885..12d0d8084 100644 --- a/iOS/RootSplitViewController.swift +++ b/iOS/RootSplitViewController.swift @@ -95,11 +95,11 @@ class RootSplitViewController: UISplitViewController { } @objc func addNewFeed(_ sender: Any?) { - coordinator.showAdd(.feed) + coordinator.showAddFeed() } @objc func addNewFolder(_ sender: Any?) { - coordinator.showAdd(.folder) + coordinator.showAddFolder() } @objc func cleanUp(_ sender: Any?) { diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 2183cb4f5..2a3301241 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -384,7 +384,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { case .readArticle: self.handleReadArticle(activity.userInfo) case .addFeedIntent: - self.showAdd(.feed) + self.showAddFeed() } } } @@ -1167,19 +1167,27 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { rootSplitViewController.present(feedInspectorNavController, animated: true) } - func showAdd(_ type: AddControllerType, initialFeed: String? = nil, initialFeedName: String? = nil) { + func showAddFeed(initialFeed: String? = nil, initialFeedName: String? = nil) { + + // Since Add Feed can be opened from anywhere with a keyboard shortcut, we have to deselect any currently selected feeds selectFeed(nil) - let addViewController = UIStoryboard.add.instantiateInitialViewController() as! UINavigationController + let addNavViewController = UIStoryboard.add.instantiateViewController(withIdentifier: "AddWebFeedViewControllerNav") as! UINavigationController - let containerController = addViewController.topViewController as! AddContainerViewController - containerController.initialControllerType = type - containerController.initialFeed = initialFeed - containerController.initialFeedName = initialFeedName + let addViewController = addNavViewController.topViewController as! AddWebFeedViewController + addViewController.initialFeed = initialFeed + addViewController.initialFeedName = initialFeedName - addViewController.modalPresentationStyle = .formSheet - addViewController.preferredContentSize = AddContainerViewController.preferredContentSizeForFormSheetDisplay - masterFeedViewController.present(addViewController, animated: true) + addNavViewController.modalPresentationStyle = .formSheet + addNavViewController.preferredContentSize = AddWebFeedViewController.preferredContentSizeForFormSheetDisplay + masterFeedViewController.present(addNavViewController, animated: true) + } + + func showAddFolder() { + let addNavViewController = UIStoryboard.add.instantiateViewController(withIdentifier: "AddFolderViewControllerNav") as! UINavigationController + addNavViewController.modalPresentationStyle = .formSheet + addNavViewController.preferredContentSize = AddFolderViewController.preferredContentSizeForFormSheetDisplay + masterFeedViewController.present(addNavViewController, animated: true) } func showFullScreenImage(image: UIImage, imageTitle: String?, transitioningDelegate: UIViewControllerTransitioningDelegate) { diff --git a/iOS/SceneDelegate.swift b/iOS/SceneDelegate.swift index ef66c3b9e..74a99a543 100644 --- a/iOS/SceneDelegate.swift +++ b/iOS/SceneDelegate.swift @@ -100,7 +100,7 @@ private extension SceneDelegate { case "com.ranchero.NetNewsWire.ShowSearch": coordinator.showSearch() case "com.ranchero.NetNewsWire.ShowAdd": - coordinator.showAdd(.feed) + coordinator.showAddFeed() default: break } diff --git a/iOS/Settings/SettingsViewController.swift b/iOS/Settings/SettingsViewController.swift index b326bc3e6..13fc9330d 100644 --- a/iOS/Settings/SettingsViewController.swift +++ b/iOS/Settings/SettingsViewController.swift @@ -371,14 +371,13 @@ private extension SettingsViewController { func addFeed() { self.dismiss(animated: true) - - let addNavViewController = UIStoryboard.add.instantiateInitialViewController() as! UINavigationController - let addViewController = addNavViewController.topViewController as! AddContainerViewController - addNavViewController.modalPresentationStyle = .formSheet - addNavViewController.preferredContentSize = AddContainerViewController.preferredContentSizeForFormSheetDisplay - addViewController.initialControllerType = .feed + + let addNavViewController = UIStoryboard.add.instantiateViewController(withIdentifier: "AddWebFeedViewControllerNav") as! UINavigationController + let addViewController = addNavViewController.topViewController as! AddWebFeedViewController addViewController.initialFeed = appNewsURLString - addViewController.initialFeedName = "NetNewsWire News" + addViewController.initialFeedName = NSLocalizedString("NetNewsWire News", comment: "NetNewsWire News") + addNavViewController.modalPresentationStyle = .formSheet + addNavViewController.preferredContentSize = AddWebFeedViewController.preferredContentSizeForFormSheetDisplay presentingParentController?.present(addNavViewController, animated: true) }