CallMeRex
CallMeRex

Reputation: 125

How to return from "partial curl" type segue

I am attempting to use a partial curl segue to reveal an options view underneath my main view. This is identical to touching the "page curl" button in the bottom right corner of the Maps app.

I can successfully execute the segue to the option view, my problem is returning to the main view. I'm hoping to replicate the reverse animation effect of the Maps app as the edge curls back flat and the main view is shown.

It doesn't seem logical to create another segue to return back to the main view (what I would do if I were not using the partial curl segue) because the return segue is associated with the original segue.

Thanks in advance for any help!

Upvotes: 2

Views: 2687

Answers (2)

Vincent
Vincent

Reputation: 4409

In Swift dismissModalViewControllerAnimated has been renamed:

@IBAction func handleAddButton(_ sender: Any) {
    self.dismiss(animated:true, completion: {})
}

Upvotes: 0

iProRage
iProRage

Reputation: 424

try

-(IBAction) buttonPressed{
    [self dismissModalViewControllerAnimated:YES];
}

This should work!

Or i believe you can press the back side of the turned page and it will return automatically with out adding any code! Hope that helps!

Upvotes: 3

Related Questions