This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIViewController { | |
/// This method allow you to go back the nearest ViewController of type T | |
/// | |
/// - Parameter type: the type of the target ViewController | |
/// - Returns: true if the method succeded, false if the user has to take extra actions to go back to the previous ViewController | |
func back<T: UIViewController>(to type: T.Type) -> Bool { | |