sammcewan / WYPopoverController

WYPopoverController is for the presentation of content in popover on iPhone / iPad devices. Very customizable.
Other
253 stars 74 forks source link

Popover hides instantly #49

Closed citruz closed 9 years ago

citruz commented 9 years ago

Hi, I want to use WYPopoverController in my iOS 8 app using the following code:

UIViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"selectMapViewController"];

WYPopoverController *popoverController = [[WYPopoverController alloc] initWithContentViewController:vc];
popoverController.delegate = self;
popoverController presentPopoverFromBarButtonItem:sender permittedArrowDirections:WYPopoverArrowDirectionAny animated:YES];

When I tap the connected button, I can see the Popover View fading in, but it is disappearing instantly. What am I doing wrong?

Cheers

rolleric commented 9 years ago

Could it be that it is deallocated because there is no strong reference to it? Try storing the popoverController as a "strong" property.

citruz commented 9 years ago

Great, thanks for the hint!