Hi everyone
I’m having trouble adding a GUI to my iOS app. I’ve tried the following:
1 - Build new app using project generator.
2 - Add contents of iPhoneGuiExample/src/gui to new project
3 - Add the following to the top of ofApp.mm:
#include “MyGuiView.h”
MyGuiView * myGuiViewController;
void ofApp::setup(){
//Our Gui setup
myGuiViewController = [[MyGuiView alloc] initWithNibName:@“MyGuiView” bundle:nil];
[ofxiOSGetGLParentView() addSubview:myGuiViewController.view];
}
And these properties to ofApp.h (props referenced from MyGuiView):
float lengthRatio;
int numPoints;
bool bFill;
4 - Update MyGuiView.xib to open in latest Xcode and build for latest iOS
5 - Make sure .xib is added to Target / Build Phases / Copy Bundle Resources
6 - Check all the values in the inspectors (right side bar) when .xib is selected. File’s owner and view are linked. I noticed File’s owner / Identity Inspector / Class was “MyMusicView”. I changed this to MyGuiView. This didn’t help other than linkage warnings were removed.
The app builds fine and deploys to the device but the GUI is not displayed. Any thoughts on this?