Tab picker: Allow multiple selection/deletion

This commit is contained in:
James Magahern
2021-02-11 19:20:06 -08:00
parent 94b0f4348c
commit 09c6204a73
5 changed files with 112 additions and 22 deletions

View 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
}
}