dismiss context menu view when the screen rotates

pull/699/head
ryanzhao 2 years ago
parent ccc517746d
commit 202a2de1b5

@ -283,6 +283,11 @@ final class ContextMenuVC: UIViewController {
}
}
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
snDismiss()
}
func calculateFrame(menuHeight: CGFloat, spacing: CGFloat) -> CGRect {
var finalFrame: CGRect = frame
let ratio: CGFloat = (frame.width / frame.height)

Loading…
Cancel
Save