Skip to content

Instantly share code, notes, and snippets.

View Budyn's full-sized avatar

Daniel Budyński Budyn

  • Warsaw, Poland
View GitHub Profile
const pvKey = "xxx"
const puKey = "xxx"
const baseURL = "https://cloud.iexapis.com/stable"
const sheetHeader = [
{title: "Ticker", format: "@"},
{title: "Name", format: "@"},
{title: "Price", format: "$0.00"},
{title: "Change 24h", format: "@"},
{title: "Dividend", format: "$0.00"},
@Budyn
Budyn / UIColor+System.swift
Last active January 30, 2020 06:14
Dynamic colors in Swift. Use it for dark mode.
extension UIColor {
static func system(light: UIColor, dark: UIColor) -> UIColor {
guard #available(iOS 13, *) else { return light }
return UIColor { traits in
switch traits.userInterfaceStyle {
case .dark: return dark
case .light: return light
case .unspecified: return light