Skip to content

Instantly share code, notes, and snippets.

@dive
Last active January 20, 2019 15:12
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 dive/52d59114ad401bffca8616e81d2d0999 to your computer and use it in GitHub Desktop.
Save dive/52d59114ad401bffca8616e81d2d0999 to your computer and use it in GitHub Desktop.
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