PDA

View Full Version : Popover tutorial?




OmegaRace
Jul 18, 2011, 07:31 AM
Hi all,

I've put too many hours into trying to get a popover to work, to no avail.

I can get the popover itself to pop up, but I cannot put anything into it, it seems.

My biggest problem (and question) is, how to prepare the XIB to be compatible with a popover? When I create a new view XIB and populate it with buttons and save it, it is always rejected and I get an error on the console.

The error in question complains that there is no view outlet.

I guess I need a good tutorial on populating the popover.

Thanks for any clues.



jnoxx
Jul 18, 2011, 08:18 AM
Ofcourse there is, if you create a popover instance, you can literly tell it what XIB to load. U didn't show us any code what you have tried, but you also just said.
No view outlet was set.. I think that should have made u think of what couldve happened. Means your ViewController xib, has a view property (because you said it's a UIViewController), but u haven't told the XIB what view to use.
That's basic XIB building, so that shouldn't be to hard to figure out.

OmegaRace
Jul 19, 2011, 07:28 AM
Ofcourse there is, if you create a popover instance, you can literly tell it what XIB to load. U didn't show us any code what you have tried, but you also just said.
No view outlet was set.. I think that should have made u think of what couldve happened. Means your ViewController xib, has a view property (because you said it's a UIViewController), but u haven't told the XIB what view to use.
That's basic XIB building, so that shouldn't be to hard to figure out.

The problem is that even when I set the view outlet, it still refuses to load.

jnoxx
Jul 19, 2011, 07:44 AM
That's weird, and not normal, but without seeing anything, I can't really help you. I just did this yesterday, and worked fine. probably will be a small setting in your XIB or something, assign the good class etc.