Hi all,
When updating to iOS6.1, my app was not responding to orientation change,
I found out it was related to this console message when starting the app :
“Application windows are expected to have a root view controller at the end of application launch”
After some search I implemented into [color=#404080]JuceAppStartupDelegate[/color] the [color=#004080]didFinishLaunchingWithOptions[/color],
and copied the content of [color=#004080]applicationDidFinishLaunching[/color] into it, with adding a “return YES” at the end.
But this doesn’t solves the problem, this warning is still here, and I don’t know how to set the root view controller in [color=#004080]didFinishLaunchingWithOptions[/color]… here is how it looks like now :
[code]- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
initialiseJuce_GUI();
JUCEApplication* app = dynamic_cast <JUCEApplication*> (JUCEApplicationBase::createInstance());
if (! app->initialiseApp (String::empty))
exit (0);
return YES;
}[/code]
I imagine I should use somehow the [color=#804080]setRootViewController[/color], but I don’t know how to write it, as I’m really new in objective C.
I also read the other post describing this console message, but my setContentOwned is set prior the setVisible call : in my app, a DocumentWindow is created in the JUCEApplication::initialise , and the setContentOwned is at the start of the ctor of DocumentWindow.
Thanks,
Veronique