0 Replies
      Latest reply on Oct 9, 2019 10:48 PM by elitedeveloper
      elitedeveloper Level 1 Level 1 (0 points)

        I am using the following code to find out if the iPad is landscape or portrait in the face up or face down orientation to layout UICollectionView Cell... But I am getting the error "'statusBarOrientation' was deprecated in Mac Catalyst 13.0: Use the interfaceOrientation property of the window scene instead."


        My Code looks something like this:


        if UIApplication.shared.statusBarOrientation.isPortrait {
        let spacing = self.view.frame.size.width - 15
        let itemWidth = spacing / 2
        sizeArea = CGSize(width: itemWidth, height: itemWidth)