Search code examples
uipopovercontrolleruipopoverios5.1

How do I enable Popover on launching my app?


I would like to enable Popover controller, right on the launch of my application in the portrait mode. Kindly give me some points to note down, I'm a newbie.

Thanks,


Solution

  • After playing a lot with my code, i found this...

    - (void)viewDidAppear:(BOOL)animated
    {
        [super viewDidAppear:animated];
        if (masterPopoverController != nil) {
            [masterPopoverController presentPopoverFromRect:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUnknown animated:YES];
        }   
    }