From 0d9a50380c2d3ecc33f632f9f0e158c3a8cd2099 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 7 Dec 2012 15:28:13 +0100 Subject: iOS: when in fullscreen, autoresize the view when the device rotates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tell the view that backs QWindow to autoresize itself when the superview (view of the root view controller) changes size. This will typically happen when the device changes orientation. Change-Id: Ib7c4dff9112d57f60012d3f0837677e09088bcaf Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qioswindow.mm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm index 7f03e0d46a..2b97695a10 100644 --- a/src/plugins/platforms/ios/qioswindow.mm +++ b/src/plugins/platforms/ios/qioswindow.mm @@ -234,9 +234,11 @@ void QIOSWindow::setWindowState(Qt::WindowState state) case Qt::WindowMaximized: case Qt::WindowFullScreen: m_view.frame = toCGRect(QRect(QPoint(0, 0), window()->screen()->availableSize())); + m_view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; break; default: m_view.frame = toCGRect(geometry()); + m_view.autoresizingMask = UIViewAutoresizingNone; break; } } -- cgit v1.2.3