Tab picker: Allow multiple selection/deletion
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
protocol ScriptPolicyViewControllerDelegate: class {
|
||||
protocol ScriptPolicyViewControllerDelegate: AnyObject {
|
||||
func didChangeScriptPolicy()
|
||||
func setScriptsEnabledForTab(_ enabled: Bool)
|
||||
}
|
||||
@@ -96,16 +96,7 @@ class ScriptPolicyViewController: UIViewController, UICollectionViewDelegate
|
||||
}
|
||||
|
||||
override var traitCollection: UITraitCollection {
|
||||
get {
|
||||
let actualTraits = super.traitCollection
|
||||
if actualTraits.userInterfaceIdiom == .mac {
|
||||
// Override traits to be iPad like on mac. We dont want small list cells here.
|
||||
let desiredTraits = UITraitCollection(userInterfaceIdiom: .pad)
|
||||
return UITraitCollection(traitsFrom: [ actualTraits, desiredTraits ])
|
||||
}
|
||||
|
||||
return actualTraits
|
||||
}
|
||||
get { return super.traitCollection.alwaysPadLike() }
|
||||
}
|
||||
|
||||
private static let enableScriptsForTabItem: String = "enableScriptsForTab"
|
||||
@@ -229,6 +220,7 @@ class ScriptPolicyViewController: UIViewController, UICollectionViewDelegate
|
||||
|
||||
override func loadView() {
|
||||
self.view = collectionView
|
||||
self.view.backgroundColor = .systemGroupedBackground
|
||||
}
|
||||
|
||||
// MARK: UICollectionViewDelegate
|
||||
|
||||
Reference in New Issue
Block a user