Created
February 25, 2019 12:24
-
-
Save dive/e3d8bcd78055a1b652622d6d4b0b7d0d to your computer and use it in GitHub Desktop.
SPM:Article:FrameworkPackage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| public final class FrameworkPackage { | |
| public init () { } | |
| public func randomColor() -> UIColor { | |
| return UIColor.random | |
| } | |
| } | |
| public extension UIColor { | |
| public static var random: UIColor { | |
| return UIColor(red: .random(in: 0...1), green: .random(in: 0...1), blue: .random(in: 0...1), alpha: 1) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment