Skip to content

Commit

Permalink
Merge pull request #696 from miguelpruivo/develop
Browse files Browse the repository at this point in the history
Replaces UI_USER_INTERFACE_IDIOM() with UIDevice.current.userInterfac…
  • Loading branch information
zhangao0086 authored Mar 20, 2022
2 parents 7cc132a + ded0926 commit 982def6
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 982def6

Please sign in to comment.