zetachang / DCModalSegue

A custom segue which makes a pushed back modal presenting animation.
MIT License
319 stars 23 forks source link

Weird re-sizing when unwinding #6

Closed timthowtdi closed 11 years ago

timthowtdi commented 11 years ago

We're using DCModalSegue in an app we're developing, and it works great transitioning from the MainViewController to any other view, but when unwinding from that view back to MainViewController, it will switch back and MainViewController will be too long, and it will 'squeeze' itself onto the screen, looks fine once it's done that, it's just jarring.

**Does not move smoothly like the gif, edit, upon looking at the gif more closely, it may actually do it on that as well, but since theres no content on the mainView, you can only tell because the navbar flickers oddly.

zetachang commented 11 years ago

Hi, I've noticed this too. The current implementation take a screenshot before doing animation. The main reason of the "squeeze" feeling is that the screenshot taken is not perfectly "the same" as the screen.

I think making the animation smoother may eliminate the "squeeze" feeling. But in the long run, I am seeking for a better way to take screenshot. (e.g. - (UIView *)snapshotView available in iOS 7 and this guide )

I will try some experiment in these days, and also appreciate any kind of pull requests if you got any better solutions. :wink:

timthowtdi commented 11 years ago

Indeed, we're all salivating at the chance to get to use all the tools in iOS7, tools we wished we'd had years ago. Will be exciting, thanks for the prompt reply, I've been digging into the code, seeing what I can find to fix it, because I do enjoy the effect

zetachang commented 11 years ago

Hooray! Just update to Apple's sample code, and it work perfectly well! :beers:

timthowtdi commented 11 years ago

Awesome, just implemented and tested, looks great!