Latest 1.0.1
Homepage https://github.com/AndrewKochulab/ViewControllerDescribable
License MIT
Platforms ios 8.0, requires ARC
Authors

License

A simple way to switch between controllers.

Just install the pod and it is ready to use!

Requirements

  • Swift >= 3.0
  • iOS >= 8.0

Installation

CocoaPods

pod 'ViewControllerDescribable'

And after in terminal run command

pod install

In your project create an enumeration like this:

extension UIStoryboard {
   enum Name: String, StoryboardNameDescribable {
       case main = "Main",
       profile = "Profile"
   }
}

Usage

Describe your view controller like this:

import ViewControllerDescribable

extension SecondViewController: ViewControllerDescribable {
   static var storyboardName: StoryboardNameDescribable {
       return UIStoryboard.Name.profile
   }
}

And after push or present from view controller you have:

navigationController?.push(SecondViewController.self, configuration: { vc in
   vc.firstName = "Hello"
})

present(ThirdViewController.self)

Example

ViewControllerDescribableTest

Credits

  • by Andrew Kochulab
  • VK

Latest podspec

{
    "name": "ViewControllerDescribable",
    "version": "1.0.1",
    "summary": "A simple way to switch between controllers.",
    "homepage": "https://github.com/AndrewKochulab/ViewControllerDescribable",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Andrew Kochulab": "[email protected]"
    },
    "social_media_url": "http://vk.com/ko4ylab",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source": {
        "git": "https://github.com/AndrewKochulab/ViewControllerDescribable.git",
        "tag": "master",
        "submodules": false
    },
    "source_files": "ViewControllerDescribable/**/*.{h,swift}",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This