NibKeyCodable
public protocol NibKeyCodable
Mechanica
Types adopting the NibKeyCodable
protocol can be used to define Nib names.
-
nib(forKey:bundle:)
Extension methodMechanica
Creates and returns a Nib object for a specified nib enum case.
i.e. “` extension Nib: NibKeyCodable { enum NibName : String { case first =
first
case second =second
} }let firstNib = Nib.nib(forKey: .first) ”` - Note: If the bundle parameter is nil, the main bundle is used.
Declaration
Swift
public static func nib(forKey key: NibName, bundle: Bundle? = nil) -> Nib