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.

33 lines
606 B

2 years ago
  1. //
  2. // ImageResource.swift
  3. // R.swift.Library
  4. //
  5. // Created by Mathijs Kadijk on 11-01-16.
  6. // From: https://github.com/mac-cain13/R.swift.Library
  7. // License: MIT License
  8. //
  9. import Foundation
  10. public protocol ImageResourceType {
  11. /// Bundle this image is in
  12. var bundle: Bundle { get }
  13. /// Name of the image
  14. var name: String { get }
  15. }
  16. public struct ImageResource: ImageResourceType {
  17. /// Bundle this image is in
  18. public let bundle: Bundle
  19. /// Name of the image
  20. public let name: String
  21. public init(bundle: Bundle, name: String) {
  22. self.bundle = bundle
  23. self.name = name
  24. }
  25. }