Open gran33 opened 11 years ago
+1, I'm seeing this as well.
+1, use NSNotificationCenter as a quick hack for now
Also seeing this
The problem appears to be from using "- (void)presentPopupViewController:(UIViewController*)popupViewController animationType:(MJPopupViewAnimation)animationType" to present a view controller with a view that is the full size of the screen. It appears that the project is expecting your viewcontroller's root view to be only the size of the content inside. So, if you're making a view controller and adding a subview to that view controller's view, you must also resize your view controller's view property to be exactly the size of the subview you want to show.
Also, another little note, if you dismiss from a different view controller than you presented from, the background darkness will not properly fade with the rest of the foreground view. For proper appearance, you MUST present and dismiss from the same view controller.
Maybe this workaround will help you guys out in:
set up NSnotificationcenter IE:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleNotification:) name:@"slideOutDone" object:nil];
fire it in the animation completion:
[[NSNotificationCenter defaultCenter]
postNotificationName:@"slideOutDone"
object:self];
your handler will be something like:
-(void)handleNotification:(NSNotification *)pNotification { [dismissButton sendActionsForControlEvents:UIControlEventTouchUpInside]; [[NSNotificationCenter defaultCenter] removeObserver:self]; }
+1
Send notification to presenting view controller to dismiss will help :)
There is a simple fix for this, hope it helps some one,
create a sample delegate in the view controller which is about to be presented
in this case Test View Controller is the view controller which am presenting
/\ Test View Controller .h**/ @interface TestViewController : UIViewController<UITableViewDataSource,UITableViewDelegate> { id delegate; } @property (nonatomic, assign) id delegate;
/Test View Controller.m/
//button action to dismiss
//while presenting don't forget to set delegate/
TestViewController* previewVC=[[TestViewController alloc]init]; previewVC.delegate=self; [self presentPopupViewController:previewVC animationType:MJPopupViewAnimationSlideTopBottom dismissed:nil];
Hi,
When i invoke: [self dismissPopupViewControllerWithanimationType:MJPopupViewAnimationFade]; From my popup, the popup dismiss, but the background ViewController still fade.
How can i fix it?
10x in advance!
Ran