martinjuhasz / MJPopupViewController

A UIViewController Category to display a ViewController as a popup with different transition effects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't show MJPopup on iOS 7

dleviathan opened this issue · comments

I have TableView in UIViewController with custom cell. And in custom cell I have 1 A view with UITapGestureRecognizer when tap it I call viewController as popup as below:
in AView.m

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; PreviewImageController *vc = [storyboard instantiateViewControllerWithIdentifier:STORYBOARD_ID_PREVIEW_IMAGE]; vc.sUrlImage = self.sUrl; vc.view.frame = CGRectMake(200, 200, 250, 250); vc.tapToBack = ^{ [[self parentVController] dismissPopupViewControllerWithanimationType:MJPopupViewAnimationFade]; }; [[self parentVController] presentPopupViewController:vc animationType:MJPopupViewAnimationFade];

with [self parentVController] is category from UIView:
-(UIViewController *)parentVController{ id object = [self nextResponder]; while (![object isKindOfClass:[UIViewController class]] && object != nil) { object = [object nextResponder]; } return object; }

When I check parentController, it still get exactly UIViewcontroller include tableview. But popup no show. Have any idea for solution?