From 3324c40a83bcb15b5dc0ebc157c8a8c85f42d119 Mon Sep 17 00:00:00 2001 From: Ernesto Rivera Date: Mon, 21 May 2018 16:56:55 -0400 Subject: [PATCH] Fix right drawer placement on iPads --- DrawerController/Models/DrawerContent.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/DrawerController/Models/DrawerContent.swift b/DrawerController/Models/DrawerContent.swift index d98e026..5669f98 100644 --- a/DrawerController/Models/DrawerContent.swift +++ b/DrawerController/Models/DrawerContent.swift @@ -183,16 +183,17 @@ public class DrawerContent { contentView.frame.size.width = width drawerOffset = 0.0 - guard let superView = contentView.superview else { return } + guard let superview = contentView.superview else { return } if drawerSide == .right { - drawerOffset = superView.frame.width - width + drawerOffset = superview.frame.width - width } - viewController.view.frame = CGRect( + contentView.frame = CGRect( x: CGFloat(-drawerOffset), y: 0, width: width, - height: superView.frame.height + height: superview.frame.height ) + viewController.view.frame = contentView.bounds }