extension UIViewController {
var deviceOrientation:UIDeviceOrientation {
guard let window = view.window else { return .unknown }
let fixedPoint = window.screen.coordinateSpace.convert(CGPoint.zero, to: window.screen.fixedCoordinateSpace)
if fixedPoint.x == 0 {
if fixedPoint.y == 0 { return .portrait }
return .landscapeRight
} else {
if fixedPoint.y == 0 { return .landscapeLeft }
return .portraitUpsideDown
}
}
}
Post
Replies
Boosts
Views
Activity
Some people online say this is just a log end not to worry about it. My app is literally not working anymore. Some views are unusable suddenly. Both on simulator and devices.
Does anyone have un update on this performance issue? Is UICollectionView still be the better option for scalable grids?