InfoViewController *popoverView = [[InfoViewController alloc] init];
popoverView.delegate = self;
// Creates the popoverController object
infoPopover = [[UIPopoverController alloc] initWithContentViewController:popoverView];
[infoPopover setDelegate:self];
[infoPopover presentPopoverFromRect:CGRectMake(512, 200, 10, -30) inView:self.view permittedArrowDirections:0 animated:NO];
[infoPopover setPopoverContentSize:CGSizeMake(400, 500)];
and then instructions;
in PopoverViewController
the .xib file
- in the view change the status bar = None, so that you can resize the screen
- add controls as you like
- add IBOutlet IBActions to match the xib file
- connect them to the xib objects
- add delegate protocol & method definitions at the bottom of the file
- add the delegate property using assign & id
- synthesize & release the popover controls
the .h file
- add the conforms to
- add a UIPopoverController property use assign for the property
- Add an IBAction show button to display the popover
- Add the delegate's methods