Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SlidingMenuView wrong Position after presenting imagePicker #34

Open
MatthieuTnsc opened this issue Apr 8, 2015 · 11 comments
Open

SlidingMenuView wrong Position after presenting imagePicker #34

MatthieuTnsc opened this issue Apr 8, 2015 · 11 comments

Comments

@MatthieuTnsc
Copy link

Hi,

I am using PageMenu in my project within a TabBar Controller and a Navigation Controller.
When I initialize the "Scrolling menu" I use this to display it under the statusBar and the navigation bar :

pageMenu = CAPSPageMenu(viewControllers: controllerArray, frame: CGRectMake(0, UIApplication.sharedApplication().statusBarFrame.size.height + self.navigationController!.navigationBar.frame.height, self.view.frame.width, self.view.frame.height), options: parameters)

This solution is working perfectly and display my menu exactly where I want !
Then I present an image picker view inside one of the scrolling view. After dismissing it, the menu goes back to the initial place (under the navigation bar)...

Any solution to avoid this issue ? (If you need more detail I can provide my code)

P.S. I'm not a native English speaker so I hope my question is understandable :)
Thank you for your work by the way !

@fahlout
Copy link
Member

fahlout commented Apr 8, 2015

Hey, could you post a short video of what exactly is happening? That usually helps a lot trying to figure out a solution

@MatthieuTnsc
Copy link
Author

@MatthieuTnsc
Copy link
Author

Any idea for a solution ?

@fahlout
Copy link
Member

fahlout commented Apr 13, 2015

Sorry I haven't had a chance to look at it further yet. I hope to be able to give you a solution soon!

@hunterlins
Copy link

Hey - this is the same issue I'm having to with the pagemenu sitting behind the navbar. Look forward to seeing a solution.

@nokai
Copy link

nokai commented Apr 16, 2015

Also it happens that! :(

@Pr0gmaT1k
Copy link

Me too. Work perfectly on another project and work on a fresh project...
Unable to reproduce from scratch.

@munnie
Copy link

munnie commented Oct 15, 2015

In parent view controller, add pageMenu as child VC:
[self addChildViewController:_pageMenu];

In child VC, call picker by this
UIViewController*vc=self.parentViewController.parentViewController;
[vc presentViewController:imagePickerController
animated:YES
completion:nil];

@AnthoPakPak
Copy link

I'm still facing the same issue, does anybody has a workaround for this ?
Thanks in advance :)

@vishaljain790
Copy link

marginTop = yourNavigationBarHeight;
self.pageMenu = PageMenu(viewControllers: controllerArray, frame: CGRectMake(0.0, marginTop, self.view.frame.width, self.view.frame.height), pageMenuOptions: parameters)

@neovo99
Copy link

neovo99 commented Jun 10, 2018

Hey guys!
This code solved me the issue.

addChildViewController(pageMenu!)
self.view.addSubview(pageMenu!.view)
pageMenu!.didMove(toParentViewController: self)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants