You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
647 B

2 years ago
//
// UINib+NibResource.swift
// R.swift.Library
//
// Created by Mathijs Kadijk on 08-01-16.
// From: https://github.com/mac-cain13/R.swift.Library
// License: MIT License
//
import UIKit
public extension UINib {
/**
Returns a UINib object initialized to the nib file of the specified resource (R.nib.*).
- parameter resource: The resource (R.nib.*) to load
- returns: The initialized UINib object. An exception is thrown if there were errors during initialization or the nib file could not be located.
*/
convenience init(resource: NibResourceType) {
self.init(nibName: resource.name, bundle: resource.bundle)
}
}