#Mac OS X
This file contains 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 | |
struct Color { | |
let color: UIColor | |
init(r: CGFloat = 0.0, | |
g: CGFloat = 0.0, | |
b: CGFloat = 0.0, | |
a: CGFloat = 1.0) | |
{ | |
color = UIColor(red: r, green: g, blue: b, alpha: a) |
This file contains 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
#!/bin/bash | |
# Xcode: Set version and build number from Git | |
# -------------------------------------------- | |
# | |
# This script sets the version number `CFBundleShortVersionString` to one of | |
# | |
# - `1.2.3` -- for the tagged commit `v1.2.3` or a hyphen-separated prerelease, | |
# e.g. `v1.2.3-alpha`, `v1.2.3-alpha.2`, `v1.2.3-beta`, `v1.2.3-rc`. | |
# - `1.2.3-7-gabc1234` -- at commit `abc1234`, 7 commits after `v1.2.3`, | |
# - `1.2.3-7-gabc1234-dirty` -- when there are uncommitted changes, or |