Skip to content

Instantly share code, notes, and snippets.

@dive
Created February 25, 2019 12:24
Show Gist options
  • Select an option

  • Save dive/e3d8bcd78055a1b652622d6d4b0b7d0d to your computer and use it in GitHub Desktop.

Select an option

Save dive/e3d8bcd78055a1b652622d6d4b0b7d0d to your computer and use it in GitHub Desktop.
SPM:Article:FrameworkPackage
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