Loadable

public protocol Loadable

Lodable protocol to load from nib

  • load UIView from xib

    Declaration

    Swift

    public static func loadFromNib(withFrame frame: CGRect? = nil, identifier: String? = nil, bundle: Bundle = Bundle.main) -> Self?

    Parameters

    frame

    CGRect default = nil

    bundle

    default = Bundle.main

  • loadFromOutlet(bundle:) Extension method

    load UIView from outlet

    Declaration

    Swift

    @discardableResult
    public func loadFromOutlet<T>(bundle: Bundle = Bundle.main) -> T? where T : UIView

    Parameters

    bundle

    default = Bundle.main