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

Arbitrary number of sides #5

Open
robertmryan opened this issue Jul 22, 2013 · 3 comments
Open

Arbitrary number of sides #5

robertmryan opened this issue Jul 22, 2013 · 3 comments

Comments

@robertmryan
Copy link
Collaborator

@pyro2927 I've done a rendition of this that properly handles an arbitrary number of sides. Specifically, if there are four sides, it works like before, rotating a cube. But if there are three sides, it's like rotating a triangular prism. If there are five sides, it's like rotating a pentagonal prism, etc. If there are two sides, it's like flipping a card. Etc.

The alternative is to keep the cube-like transition, regardless of the number of sides. I'm less crazy about that approach, but this is your class, so I'll let you make the call.

So, two questions:

  1. Would you like me to submit that as a separate branch? Or should I fork it and you can decide to merge it (or not merge it)?
  2. Do you have strong opinions regarding my visual metaphor, rotating an object with the number of sides commensurate with the number of child view controllers? Or staying with the cube metaphor regardless of the number of sides?
@pyro2927
Copy link
Owner

  1. It would be nice to see in a separate branch to do a review of the code. If it's well laid out and fully compatible with the existing code I'm cool with merging it into master after a review.

  2. I think different rotation animations depending on the number of sides sounds awesome! If you're comfortable tackling that kind of change, I'd love to see it.

@robertmryan
Copy link
Collaborator Author

@pyro2927 I created a poorly named "non-cube-support" branch that (a) supports variable number of child view controllers; (b) does some dimming of the sides of the "cube" as they rotate out of view; and (c) retired custom protocol in favor of viewDidAppear/viewDidDisappear methods.

@pyro2927
Copy link
Owner

Nice! Looks awesome. It's almost midnight, and I'm half asleep, but I'll do a more thorough code review tomorrow and then we can merge it into master.

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

No branches or pull requests

2 participants