I’m trying to adapt Theo’s iPhone GUI example for the iPad, but I’m not having much fun.
So far I’ve managed to get the existing xib file to full iPad resolution by hacking the .xib file with TextMate to change the resolution from 320 480 to 768 1024. That gave me extra canvas space in the Interface Builder to play around, but you cant get splitview up and running.
So I wanted to start a new xib file. I made a new file and replaced the old one in my project. But now when I try to open the xib file at
#7 0x33b04e48 in std::terminate #8 0x33b04f18 in __cxa_throw #9 0x333736aa in objc_exception_throw #10 0x31597c74 in +[NSException raise:format:arguments:] #11 0x31597d3e in +[NSException raise:format:] #12 0x30201280 in -[UIViewController _loadViewFromNibNamed:bundle:] #13 0x30161180 in -[UIViewController loadView] #14 0x301592c6 in -[UIViewController view] #15 0x0000648c in testApp::setup at testApp.mm:22
So it seems to be having trouble getting myGuiViewController.
i cant find any reference to myGuiViewController in Interface Builder. The only reference that I can find is to “MyMusicView” which is set as the Class for File Owner. But I cant see that anywhere in XCode so I guess that doesn’t matter too much.
So my guesses are that either:
* There’s a reference name that ‘addSubView’ is looking for which isn’t in my new file
* There’s a type of something in ‘addSubView’ that isn’t available in the xib file
* The xib file is somehow the wrong format
my xib file contains
‘file’s owner’, ‘first responder’ and ‘view’
I’ve tried a blank iPhone xib, but that gives the same error.
I cant seem to connect ‘New Referencing Outlet’ of View to File’s Owner
so i think that’s where i’ll start…
If I open up Theo’s xib file (i think it’s theos, i saw his name on this example somewhere. sorry if i’m misplacing credit!)
and inside there’s reference to the MyGuiView class and to the .h file:
I used ‘File > Read Class Files’ and pointed at my h file
InterfaceBuilder complained there were no classes found
Then I set my File’s Owner class to MyGuiView
and I could link the View to File Owner’s view
then my interface is still rendered in portrait (it overflows the edge of the screen and doesn’t cover all the way to the bottom).
Also my view blocks out my openFrameworks rendering. I tried ‘Clear Context Before Drawing’ is disabled on the View and everything in it, but didn’t appear to help.
Your view is probably blocking your openFrameworks view because it is not transparent. You can make your view transparent in Interface Builder or programmatically.
Note that the views you add are always rendered on top of your openFrameworks view and that touches cannot be received in openFrameworks if the other view is on top of it.