Posts

Post marked as solved
7 Replies
7.3k Views
Hello,The following function is triggered whenever the device is rotated, except in the case when I "flip" the device along it's X axis when in landscape mode. override func willTransition(to newCollection: UITraitCollection, with coordinator: UIViewControllerTransitionCoordinator) { print("orientation after activity = " + String(UIDevice.current.orientation.rawValue)) }If I hold a device in landscape mode, and then rotate it away from me, so that the screen is facing away, the view rotates, but the willTransition func is not triggered. So if I am starting out in landscape left with the device facing me, and then do my "flip", it's essentially now landscape right with the screen facing away from me.I am building a "flip mode" in my app where I want two specific views to rotate, but I don't want the entire window to rotate. I can't seem to figure out how to detect this transition so that I can properly handle it in my code.
Posted
by jplumey.
Last updated
.