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

Code sample for rotation/orientation support? #4

Closed
palringosteve opened this issue Oct 1, 2012 · 3 comments
Closed

Code sample for rotation/orientation support? #4

palringosteve opened this issue Oct 1, 2012 · 3 comments

Comments

@palringosteve
Copy link
Contributor

This class is brilliant, however I've been struggling to get it working in multiple orientations; show a popover in portrait mode, rotate to landscape mode and it's nowhere near the point that I originally specified.

I've tried setting the autoresizingMask to have flexible left/top margins but this doesn't seem to work either.

I've also tried dismissing the popover then calling one of the show... methods again in response to an orientation event but this seems to result in the popover disappearing completely.

Any assistance would be greatly appreciated :)

@ocrickard
Copy link
Contributor

Hello,

Sorry for the difficulty with the control! Unfortunately, I had not designed the control originally for rotation, which was a big oversight! We use it in an iPhone app with just a single orientation, so it wasn't a big deal.

I think your idea of dismissing and calling a show method again is a good one. I believe I do some cleanup in the dismiss function that probably shouldn't be there. Instead I'll create a separate optional method that avoids memory/view cleanup and allows you to display again. At work right now, but I'll try to take a look at this tonight when I get home.

Thanks,
Oliver

@palringosteve
Copy link
Contributor Author

Thanks for the quick reply, your proposed solution sounds perfect, and would benefit our use of the PopoverView greatly.

@ocrickard
Copy link
Contributor

Hello Steve,

I believe I have added support for rotation to the component, though it's my first pass at the problem. Let me know if you have any issues with it. There is an update to the demo project that shows how I do this.

Oliver

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

2 participants