I convert and iphone project to ipad. On iphone, I have mainViewController which opens loginViewController with addSubView.
On an iPad, I would like to display this loginViewController in a popover. so I did something like:
UIPopoverController *loginPop = [[UIPopoverController alloc] initWithContentViewController:loginViewController];
[loginPop presentPopoverFromRect:CGRectMake(150, 150, 90, 90) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:true];
It works great. The problem is that loginViewController is ending its "business". On the iPhone, I just call simple [self.view removeFromSuperview];But on the ipad, this removes the view from the PopoverController, but the frame of the popup remains.
So my question is: is there any easy way from loginViewController to remove my PopoverController container (without using a delegate or notifications)?
source
share