Note that there are some explanatory texts on larger screens.

plurals
  1. POFlip, Grow, and Translate Animation
    text
    copied!<p>Look at <a href="http://youtu.be/qIqv3OH9XIU?t=1m12s">this video</a> of the MLB At Bat app. Basically, I just want to present a <code>modalViewController</code> with the <code>UIModalPresentationFormSheet</code> style and have it grow from another view then flip. Like when you tap on a game in the scoreboard on the MLB app. Anyone know how I can accomplish this?</p> <p>Thanks</p> <p>EDIT: My main view is pretty much the same setup as the MLB app. I'm using <code>AQGridView</code> and want the animation to occur when a cell in the grid view is tapped.</p> <p>EDIT 2: I'd also be open to ditching the <code>UIViewController</code> concept and just using a plain <code>UIView</code>, then replicate the style of <code>UIModalPresentationFormSheet</code> manually if that's easier.</p> <p>EDIT 3: Okay, forget using a <code>UIViewController</code> to do this, since I haven't gotten any responses, I'll assume it isn't possible. My new question is just how do I replicate the animation in the posted video using just <code>UIView</code>'s? So basically, the initial view needs to grow, move, and flip all at the same time.</p> <p>EDIT 4: I think I have the actual animation figured out, now my only problem is calculating coordinates to feed into <code>CATransform3DTranslate</code>. My view needs to animate pretty much exactly like in the video. It needs to start over another view and animate to the center of the screen. Here's how I'm trying to calculate the coordinates for the view that pops up in the center:</p> <pre><code>CGPoint detailInitialPoint = [gridView convertPoint:view.frame.origin toView:detailView.frame.origin]; CGPoint detailFinalPoint = detailView.frame.origin; </code></pre> <p><code>gridView</code> is the container view of my main view that holds the smaller grid items. <code>view</code> is the specific grid item that we are animating from. And <code>detailView</code> is the view that comes up in the middle of the screen.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload