@end
-@interface wxUIContentView : wxUIView
+@interface wxUIContentView : UIView
{
wxUIContentViewController* _controller;
}
wxWidgetIPhoneImpl* impl = new wxWidgetIPhoneImpl( now, contentview, true );
impl->InstallEventHandler();
- [toplevelwindow addSubview:contentview];
+
+ if ([toplevelwindow respondsToSelector:@selector(setRootViewController:)])
+ {
+ toplevelwindow.rootViewController = controller;
+ }
+ else
+ {
+ [toplevelwindow addSubview:contentview];
+ }
return impl;
}
return _controller;
}
++ (void)initialize
+{
+ static BOOL initialized = NO;
+ if (!initialized)
+ {
+ initialized = YES;
+ wxOSXIPhoneClassAddWXMethods( self );
+ }
+}
+
@end
@implementation wxUIContentViewController
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
{
wxWidgetIPhoneImpl* impl = (wxWidgetIPhoneImpl* ) wxWidgetImpl::FindFromWXWidget( [self view] );
footerView = frame->GetToolBar()->GetHandle();
}
}
+ return footerView;
}
@end