I developed iPad application. There is a table view in screen. If user clicking to any cell then I opening the popover. I encounter an error like this is very rare
Fatal Exception NSInvalidArgumentException
-[UIPopoverController _commonPresentPopoverFromRect:inView:permittedArrowDirections:animated:]: Popovers cannot be presented from a view which does not have a window.
Using the following method;
UIViewController *contentViewController = [[UIViewController alloc] init];
[contentViewController.view setFrame:CGRectMake(0, 0, 320, 460)];
UINavigationController *navController = [[[UINavigationController alloc] initWithRootViewController:contentViewController] autorelease];
self.popOver=[[UIPopoverController alloc] initWithContentViewController:navController];
self.popOver.delegate = self;
CGRect rectInTableView = [self.menuItems rectForRowAtIndexPath:tableRowID];
CGRect rectInSuperview = [self.menuItems convertRect:rectInTableView toView:self.view];
rectInSuperview.size.width=320;
[self.popOver presentPopoverFromRect:rectInSuperview inView:self.view permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES];
[contentViewController release];