Post

Replies

Boosts

Views

Activity

willTransition not triggered when flipping device in landscape mode
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.
7
0
7.8k
Apr ’19