Using an iOS interface from Introjucer project

Firstly, I have a project that I’m working on and now want to port it so the UI uses just the standard iOS UIKit (for now). There are a couple of reasons for this but the main one is for me to lean some Objective-C and the Apple APIs.

I finally got this to sort of work, using a completely iOS UIViewController and xib file. However I’m not sure on what juce creates initially so have to create a dummy document window, resize it and add my UIViewController’s view to it wrapped in a juce UIViewComponent. This seems like a bit of a hack and may have further complications down the road. Here is the code I have working:

[code]uiWindow = new DocumentWindow (“ReTune”, Colours::transparentWhite, DocumentWindow::allButtons);
uiWindow->setTitleBarHeight (0);
uiWindow->setVisible (true);
uiWindow->setFullScreen (true);

uiViewComponent = new UIViewComponent();
uiViewComponent->setView ((void*)[[[ReTuneViewController alloc] init] view]);
uiWindow->setContentNonOwned (uiViewComponent, false);
uiViewComponent->setVisible (true);

What I would like to do is get the main UIWindow that juce creates somewhere so I can add my view to it directly and therefore deal with all the iOS messages myself. Is this possible? How have others dealt with the same issue?

Any pointers much appreciated.

I don’t know if this can help you, but you could use Component::getWindowHandle()

And there’s also this thread: