Howdy
Just trying to load an XCode 6 xib file into my juce app.
I'm starting from scratch (Introjucer -> New Gui Application) trying to get to the heart of what needs to be done.
Instead of using a subclass of DocumentWindow like the default application does, I subclassed UIViewComponent, call it iosWindow.
Then I include a custom UIView subclass (trying to tie that to a xib), and set up the pointer to it in the header.
#include "../JuceLibraryCode/JuceHeader.h" #import "ViewTest1.h" //the custom UIView subclass class iosWindow : public UIViewComponent { public: iosWindow(); ~iosWindow(); void resized(); ViewTest1 *viewTest; private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (iosWindow) };
Then as far as I've gotten, is the iosWindow constructor - pretty sure I need to create the uiview here, but not sure how to do it.
iosWindow::iosWindow() { Logger::writeToLog("iosWindow"); setSize (500, 400); //I tried this but it says incompatible type ViewTest1 * from ViewTest1 * ??? /* viewTest = new ViewTest1(); */ setView(viewTest); }
...and of course I bring the iosWindow to life in the main file.
I am thinking there's some sort of initialisation I'm missing for my UIView itself? I've set the xib file's owner to my custom class, but I'm not sure where to go after that.
What do yall think?