diff --git a/iOS/Add/AddContainerViewController.swift b/iOS/Add/AddContainerViewController.swift index 28ed46514..ebd560c75 100644 --- a/iOS/Add/AddContainerViewController.swift +++ b/iOS/Add/AddContainerViewController.swift @@ -23,6 +23,8 @@ protocol AddContainerViewControllerChildDelegate: UIViewController { class AddContainerViewController: UIViewController { + static let preferredContentSizeForFormSheetDisplay = CGSize(width: 360.0, height: 400.0) + @IBOutlet weak var cancelButton: UIBarButtonItem! @IBOutlet weak var activityIndicatorView: UIActivityIndicatorView! @IBOutlet weak var addButton: UIBarButtonItem! diff --git a/iOS/MasterFeed/MasterFeedViewController.swift b/iOS/MasterFeed/MasterFeedViewController.swift index e170997c2..12a5380a9 100644 --- a/iOS/MasterFeed/MasterFeedViewController.swift +++ b/iOS/MasterFeed/MasterFeedViewController.swift @@ -434,8 +434,10 @@ class MasterFeedViewController: ProgressTableViewController, UndoableCommandRunn @IBAction func add(_ sender: UIBarButtonItem) { let addViewController = UIStoryboard.add.instantiateInitialViewController()! - addViewController.modalPresentationStyle = .popover + addViewController.modalPresentationStyle = .formSheet + addViewController.preferredContentSize = AddContainerViewController.preferredContentSizeForFormSheetDisplay addViewController.popoverPresentationController?.barButtonItem = sender + self.present(addViewController, animated: true) } diff --git a/iOS/Settings/SettingsViewController.swift b/iOS/Settings/SettingsViewController.swift index 2e1664f1a..f75601269 100644 --- a/iOS/Settings/SettingsViewController.swift +++ b/iOS/Settings/SettingsViewController.swift @@ -227,6 +227,7 @@ private extension SettingsViewController { let addNavViewController = UIStoryboard.add.instantiateInitialViewController() as! UINavigationController let addViewController = addNavViewController.topViewController as! AddContainerViewController addNavViewController.modalPresentationStyle = .formSheet + addNavViewController.preferredContentSize = AddContainerViewController.preferredContentSizeForFormSheetDisplay addViewController.initialFeed = appNewsURLString addViewController.initialFeedName = "NetNewsWire News"