git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72902
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxWidgetIPhoneImpl* impl = new wxWidgetIPhoneImpl( now, contentview, true );
impl->InstallEventHandler();
wxWidgetIPhoneImpl* impl = new wxWidgetIPhoneImpl( now, contentview, true );
impl->InstallEventHandler();
- [toplevelwindow addSubview:contentview];
+
+ if ([toplevelwindow respondsToSelector:@selector(setRootViewController:)])
+ {
+ toplevelwindow.rootViewController = controller;
+ }
+ else
+ {
+ [toplevelwindow addSubview:contentview];
+ }
+// 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
{
wxWidgetIPhoneImpl* impl = (wxWidgetIPhoneImpl* ) wxWidgetImpl::FindFromWXWidget( [self view] );
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
wxWidgetIPhoneImpl* impl = (wxWidgetIPhoneImpl* ) wxWidgetImpl::FindFromWXWidget( [self view] );