FRDControllerManager
public class FRDControllerManager: NSObject
FRDControllerManager is a way to manage view controllers and invoke view controllers from a URL or class name.
-
Singleton instance of FRDControllerManager
Declaration
Swift
public static let sharedInstance = FRDControllerManager()
-
Registers a url for calling handler blocks.
Declaration
Swift
@discardableResult public func register(url: URL, clazz: AnyClass) -> Bool
Parameters
url
The url to be registered.
clazz
The clazz to be registered, and the clazz’s view controller object will be launched while routed.
Return Value
True if it registers successfully.
-
Registers with a plist file.
Declaration
Swift
public func registers(plistFile: String) -> Bool
Parameters
plistFile
The plistFile path.
Return Value
True if it registers successfully.
-
Launch a view controller from source view controller with a intent.
Declaration
Swift
public func startController(source: UIViewController, intent: FRDIntent)
Parameters
source
The source view controller.
intent
The intent for launch a new view controller.
-
Launch a view controller for which you would like a result when it finished. When this view controller exits, your onControllerResult() method will be called with the given requestCode.
Declaration
Swift
public func startControllerForResult(source: UIViewController, intent: FRDIntent, requestCode: Int)
Parameters
source
The source view controller.
intent
The intent for start new view controller.
requestCode
this code will be returned in onControllerResult() when the view controller exits.