Latest 1.0.6
Homepage https://github.com/shitoexe/UIViewController-DataTransition
License MIT
Platforms ios 8.0
Authors

In source viewController:

Start transition

self.segue("segueIdentifier").execute()

Start transition with data

self.segue("segueIdentifier").passData("Passed data string").execute()

Start transition with callback

self.segue("segueIdentifier").passData("Passed data string").onComplete{ parameter in
            if let stringParameter = parameter as? String{
                print(stringParameter)
            }
         }.execute()

… without data

self.segue("segueIdentifier").onComplete{ parameter in
            if let stringParameter = parameter as? String{
                print(stringParameter)
            }
         }.execute()

If segue goes to modal viewcontroller with UINavigationControler than data will be passed to first UIViewController

In destination viewController:

Process of checking of incoming data

if let passedData = self.incomingData as? String {
   print("incoming (passedData)")
}

Passing data to source View Controller

self.complete("Data for source View Controller")
self.complete() //Just for executing callback

Latest podspec

{
    "name": "UIViewController-DataTransition",
    "version": "1.0.6",
    "summary": "Extension of UIViewController for passing data between VC during navigation transition",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "homepage": "https://github.com/shitoexe/UIViewController-DataTransition",
    "authors": {
        "Alexey Shadura": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/shitoexe/UIViewController-DataTransition.git",
        "tag": "1.0.6"
    },
    "source_files": "Source/*.swift",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This