Open alanbarboza opened 7 years ago
I solved this problem like this.
menuVC.view.frame=CGRect(x: 0 - UIScreen.main.bounds.size.width, y: -32, width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height);
UIView.animate(withDuration: 0.3, animations: { () -> Void in
menuVC.view.frame=CGRect(x: 0, y: -32, width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height);
sender.isEnabled = true
}, completion:nil)
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
if UIDevice.current.orientation.isLandscape
{
view.frame.origin.y = 32
view.frame.size.height += 32
}
else
{
view.frame.origin.y = 64
view.frame.size.height -= 32
}
}
Hi Dude, First thanks for this demo app, it's really nice.
But I've found a issue when rotate screen on iPhone 7 Plus, it preservers the top space of device.