This walk-through will take you step-by-step through working with unwind segues programmatically in Swift.
seen from China

seen from United States
seen from United States
seen from Maldives

seen from Netherlands
seen from Brazil
seen from Brazil
seen from Argentina
seen from Germany
seen from United States
seen from China
seen from Brazil

seen from Syria
seen from United States
seen from Philippines

seen from Netherlands
seen from China

seen from Brazil
seen from Russia

seen from United States
This walk-through will take you step-by-step through working with unwind segues programmatically in Swift.
Custom Segue and Custom Unwind Segue with Animations using Navigation Controller - Part 2/2
IOS 8.1 Xcode 6.1 tutorial: Customize Segue and UnwindSegue
Our goal this animation between the 2 ViewController:
6 Step need:
1. Create Custom Segue class and “-(void)perform” code
2. Change the Segue class on the storyboard
3. Test your Custom Segue in IOS Simulator
4. Create UnwindSegue
5. Detect MyCustomUnwindSegue on Storyboard
6. Test your CustomUnwindSegue and add color to your window background
Check the video, which just 6 minute! :)
If you are beginner, check the 1 part!
1. Create Custom Segue class and “-(void)perform” code
1.1. Right click New File — Cocoa Touch Class - name: MyCustomSegue, type: UIStoryboardSegue
1.2. in MyCustomSegue.m file create “-(void)perform” code:
You can refer to source VieController and destination ViewController, simply, and you can use the MyCustomSegue several places on the storyboard, regardless of which specific ViewController use it.
1.3. Put the animation into the -(void)perform code:
For example just come the destination ViewController from up to down, and source ViewController just goes down. So the full perform code looks like this:
2. Change the Segue class on the storyboard
2.1. Click on the segue, and in the Attributes inspector change the Segue from “Show” to “Custom”.
2.2. Add the MyCustomSegue class to the Segue.
3. Test your Custom Segue in IOS Simulator
Before MyCustomSegueClass:
After MyCustomSegueClass: