Tab picker: Allow multiple selection/deletion
This commit is contained in:
20
App/Utilities/UITraitCollection+MacLike.swift
Normal file
20
App/Utilities/UITraitCollection+MacLike.swift
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// UITraitCollection+MacLike.swift
|
||||
// App
|
||||
//
|
||||
// Created by James Magahern on 2/11/21.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
extension UITraitCollection {
|
||||
public func alwaysPadLike() -> UITraitCollection {
|
||||
if self.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: [ self, desiredTraits ])
|
||||
}
|
||||
|
||||
return self
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user