I'm using objective-c (obviously, I guess) and I'm wondering if there is a (simple) way to present a modal view but have the view slide in from the right side of the screen.
UIModalTransitionStyleCoverVertical has the new view slide in from the bottom, so I would naively think that there would be a Horizontal counterpart, but I can't find one in the docs.
I don't mean UIModalTransitionStyleFlipHorizontal (I don't want the 3D flip).
Is there another way to do this without the baggage of a UINavigationController? Thoughts?
TKS!
You can do this by adding the view as a subview, but setting its transform so that it is positioned off-screen, by at least one screen width in your case. Then start an animation block that includes resetting the transform to unity. Once the animation is complete you can perform other actions, such as replacing the view that is now hidden.
Here is a snippet:
The method affineTransformForTransationInDirection: is a helper that knows the width and height of the screen and returns a transform appropriate for the direction. It does this for a move in from the left: