Skip to content

Instantly share code, notes, and snippets.

@laevandus
Created July 29, 2018 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laevandus/eaff5863c596418c022ceb30a8f2a131 to your computer and use it in GitHub Desktop.
Save laevandus/eaff5863c596418c022ceb30a8f2a131 to your computer and use it in GitHub Desktop.
import UIKit
protocol InteriorLighting {
var interiorLightColor: UIColor { get }
}
struct Car: InteriorLighting {
var interiorLightColor: UIColor {
return .white
}
}
struct Truck: InteriorLighting {
var interiorLightColor: UIColor {
return .white
}
}
print(Car().interiorLightColor) // UIExtendedGrayColorSpace 1 1
print(Truck().interiorLightColor) // UIExtendedGrayColorSpace 1 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment