GKLCubeViewController icon indicating copy to clipboard operation
GKLCubeViewController copied to clipboard

Arbitrary number of sides

Open robertmryan opened this issue 12 years ago • 3 comments

@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?

robertmryan avatar Jul 22 '13 21:07 robertmryan

  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.

pyro2927 avatar Jul 22 '13 21:07 pyro2927

@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.

robertmryan avatar Jul 23 '13 03:07 robertmryan

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.

pyro2927 avatar Jul 23 '13 04:07 pyro2927