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 Foundation | |
import UIKit | |
/// MARK: - This protocol is used to allows cell to be dequeued with strong type | |
public protocol DequeuableProtocol: class { | |
/// Return the nib name in which the dequeuable resource is located | |
/// You must implement it if your cell is located in a separate xib file | |
/// (not for storyboard). | |
/// In this case you should call `table.register(CellClass.self)` before |
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 { | |