Improved sizing of add feed modal on iPad
This commit is contained in:
parent
bce45d28e4
commit
2f82f05721
|
@ -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!
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue