Swipe down modal VC like in iOS8 MailApp

387 Views Asked by At

I want to implement ability swiping down modal VC almost to the end, and with swiping up - return to the place. I tried do it with ECSlidingViewController (with zoom effect), but I have custom tabBar and I couldn't do that. I tried make it easier:

CGRect frame = self.view.frame; //or self.parentViewController.view.frame 
    frame.origin.x -= 50;
    frame.origin.y -= 50;
    self.view.frame = frame;

VC changed position, but under it I see white (or black) screen, no the vc from which I pushed. How can I achieve functionality that I want?

(I'm using Xcode 5/iOS 7.1)

1

There are 1 best solutions below

0
On

I think this new Presentation Style allow what you are looking for.

It does not hides after previous VC after the modal if shown, but it remains behind.

vc.modalPresentationStyle = UIModalPresentationOverCurrentContext

Hope this helps. G