14
votes

With iOS 7 a new push animation was created, which slides the pushed view controller on top of the hierarchy. But when the animation happens, iOS apparently does two things to modify the design of the top view controller:

A shadow is added:

A shadow of view controller when animating

And a light overlay over the bottom view controller:

A light overlay

In most applications this is not a problem. But, I am currently working on an application with pixel perfect design and I use view controllers with clear background. But this functionality remains the same, and the light overlay appears over the view controller. Because the background is a white gradient, this light overlay (on screenshot 2) is very visible and when the animation completes, it is removed without animation, which makes it very noticeable and annoying.

I am aware I can create custom animations and transitions, but I am wondering:

Is there any way to remove (or modify) this light overlay and shadow, without having to create custom transitions?

Thank you for your help.

2
did you manage to solve this?Stefan Arn
Not without heavy modifications.Legoless
Did you try using iOS 7's custom view controller transition APIs? objc.io/issue-5/view-controller-transitions.htmlrounak
Well custom transitions were made with situations like these in mind so asking for a solution that is not the correct solution is somewhat pointless.evan.stoddard

2 Answers

1
votes

It's not the most elegant solution, but I've seen people use UIImage animations to show what they want shown. So, you could:

  • Screenshot the incoming UIViewController
  • Animate the arrival of a UIImageView
  • Call pushViewController:animated:, passing NO for animated:
  • Remove the UIImageView
  • Again, a bit of a hack, but maybe it's the best solution for your scenario.

    1
    votes

    Try this proxy

    [[UIImageView appearanceWhenContainedIn:NSClassFromString(@"_UIParallaxDimmingView"), nil] setAlpha:0.0f];
    

    I don't know if Apple allows this or not because it uses a private API. Will update when app submitted.