supporting iOS 6 autorotate
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -352,7 +352,15 @@ wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now )
|
|||||||
|
|
||||||
wxWidgetIPhoneImpl* impl = new wxWidgetIPhoneImpl( now, contentview, true );
|
wxWidgetIPhoneImpl* impl = new wxWidgetIPhoneImpl( now, contentview, true );
|
||||||
impl->InstallEventHandler();
|
impl->InstallEventHandler();
|
||||||
|
|
||||||
|
if ([toplevelwindow respondsToSelector:@selector(setRootViewController:)])
|
||||||
|
{
|
||||||
|
toplevelwindow.rootViewController = controller;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
[toplevelwindow addSubview:contentview];
|
[toplevelwindow addSubview:contentview];
|
||||||
|
}
|
||||||
return impl;
|
return impl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -396,6 +404,21 @@ wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now )
|
|||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// iOS 6 support, right now unconditionally supporting all orientations, TODO use a orientation mask
|
||||||
|
|
||||||
|
-(BOOL)shouldAutorotate
|
||||||
|
{
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSUInteger)supportedInterfaceOrientations
|
||||||
|
{
|
||||||
|
return UIInterfaceOrientationMaskAll;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
|
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
|
||||||
{
|
{
|
||||||
wxWidgetIPhoneImpl* impl = (wxWidgetIPhoneImpl* ) wxWidgetImpl::FindFromWXWidget( [self view] );
|
wxWidgetIPhoneImpl* impl = (wxWidgetIPhoneImpl* ) wxWidgetImpl::FindFromWXWidget( [self view] );
|
||||||
|
Reference in New Issue
Block a user