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.

23 lines
794 B

2 years ago
  1. //
  2. // UIStoryboard+StoryboardResource.swift
  3. // R.swift.Library
  4. //
  5. // Created by Mathijs Kadijk on 07-01-16.
  6. // From: https://github.com/mac-cain13/R.swift.Library
  7. // License: MIT License
  8. //
  9. import UIKit
  10. public extension UIStoryboard {
  11. /**
  12. Creates and returns a storyboard object for the specified storyboard resource (R.storyboard.*) file.
  13. - parameter resource: The storyboard resource (R.storyboard.*) for the specific storyboard to load
  14. - returns: A storyboard object for the specified file. If no storyboard resource file matching name exists, an exception is thrown with description: `Could not find a storyboard named 'XXXXXX' in bundle....`
  15. */
  16. convenience init(resource: StoryboardResourceType) {
  17. self.init(name: resource.name, bundle: resource.bundle)
  18. }
  19. }