Latest 1.0.2
Homepage https://github.com/Jerry0523/JWIntent
License MIT
Platforms ios 8.0, requires ARC
Authors

A solution for iOS modules and components separation. You can route to viewController or perform native block with url.

Features

Register LoginViewController as follow

IntentCtx.default.register(LoginViewController.self, forKey: "login")

Register closure as follow

IntentCtx.default.register({ (param) in
    print(param)
}, forKey: "showAlert")

Route to LoginViewController by a router key

let router = try? Router.init(key: "login", extra: ["stringValue": "This message came from a router"])
router?.submit()

Route to LoginViewController with a custom transition

var router = try? Router.init(key: "login", extra: ["stringValue": "This message came from a router"])
router?.transition = SystemTransition.init(axis: .horizontal, style: .zoom(factor: 0.8))
router?.submit()

Route to LoginViewController with a custom config

var router = try? Router.init(key: "login", extra: ["stringValue": "This message came from a router"])
router?.config = .present([.fakePush, .wrapNC])
router?.transition = SystemTransition.init(axis: .horizontal, style: .zoom(factor: 0.8))
router?.submit()

Currently, we support

  • Present
  • Push
  • Switch
  • Modal
  • Child

Route to LoginViewController by a remote URL

let router = try? Router.init(urlString: "router://login?stringValue=This message came from a url string")
router?.submit()

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries. You can install it with the following command:

$ gem install cocoapods

Podfile

To integrate JWIntent into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

pod 'Intent'

Then, run the following command:

$ pod install

License

(MIT license)

Latest podspec

{
    "name": "JWIntent",
    "version": "1.0.2",
    "summary": "A solution for iOS modules and components separation. You can route to viewController or perform native block with url.",
    "homepage": "https://github.com/Jerry0523/JWIntent",
    "license": "MIT",
    "authors": {
        "Jerry Wong": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/Jerry0523/JWIntent.git",
        "tag": "1.0.2"
    },
    "source_files": [
        "Intent/*.swift",
        "Intent/Transition/*.swift"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This