Skip to content

Commit

Permalink
Replaces UI_USER_INTERFACE_IDIOM() with UIDevice.current.userInterfac…
Browse files Browse the repository at this point in the history
…eIdiom
  • Loading branch information
Miguel Ruivo committed Mar 18, 2022
1 parent 7cc132a commit ded0926
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ open class DKPopoverViewController: UIViewController {
let preferredContentSize = self.contentViewController.preferredContentSize
var popoverWidth = preferredContentSize.width
if popoverWidth == UIView.noIntrinsicMetric {
if UI_USER_INTERFACE_IDIOM() == .pad {
if UIDevice.current.userInterfaceIdiom == .pad {
popoverWidth = self.view.bounds.width * 0.6
} else {
popoverWidth = self.view.bounds.width
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ open class DKAssetGroupGridLayout: UICollectionViewFlowLayout {
super.prepare()

var minItemWidth: CGFloat = 100
if UI_USER_INTERFACE_IDIOM() == .pad {
if UIDevice.current.userInterfaceIdiom == .pad {
minItemWidth = 120
}

Expand Down

0 comments on commit ded0926

Please sign in to comment.