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
| Vagrant.configure(2) do |config| | |
| config.vm.box = "boxcutter/ubuntu1610" | |
| config.ssh.pty = true | |
| config.vm.provision "shell", inline: <<-SHELL | |
| su vagrant | |
| cd | |
| sudo apt-get -y update | |
| sudo apt-get install -y git python-dev libcurl3 clang | |
| git clone https://github.com/kylef/swiftenv.git ~/.swiftenv | |
| echo 'export SWIFTENV_ROOT="$HOME/.swiftenv"' >> ~/.bash_profile |
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
| TEAM_ID = 'XXXXXXXXXX' | |
| APP_NAME = 'My App' | |
| SCHEME_NAME = APP_NAME | |
| desc 'Create a beta build' | |
| task :build do | |
| # Ensure clean git state | |
| unless system 'git diff-index --quiet HEAD --' | |
| abort 'Failed. You have uncommitted changes.' | |
| end |
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 | |
| /// Fast, concrete text storage intended to be subclassed. | |
| class BaseTextStorage: NSTextStorage { | |
| // MARK: - Properties | |
| private let storage = NSMutableAttributedString() | |
| // MARK: - NSTextStorage |
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 Darwin.TargetConditionals; | |
| #if TARGET_OS_IPHONE | |
| @import UIKit; | |
| #else | |
| @import AppKit; | |
| #endif | |
| /// Concrete text storage intended to be subclassed. | |
| @interface BaseTextStorage : NSTextStorage |
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 Foundation | |
| import Security | |
| struct SharedWebCredentials { | |
| // MARK: - Types | |
| struct Credential { | |
| let domain: String | |
| let account: String |
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 | |
| extension UISplitViewController { | |
| convenience init(masterViewController: UIViewController, detailViewController: UIViewController) { | |
| self.init() | |
| viewControllers = [masterViewController, detailViewController] | |
| } | |
| var masterViewController: UIViewController? { | |
| return viewControllers.first |
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 | |
| extension UIColor { | |
| var desaturated: UIColor { | |
| var hue: CGFloat = 0 | |
| var brightness: CGFloat = 0 | |
| var alpha: CGFloat = 0 | |
| getHue(&hue, saturation: nil, brightness: &brightness, alpha: &alpha) | |
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
| $ git clone https://github.com/soffes/ISO8601 | |
| $ cd ISO8601 | |
| $ pod trunk push --verbose | |
| [!] Found podspec `ISO8601.podspec` | |
| Updating spec repo `master` | |
| Validating podspec | |
| ISO8601 (0.5.2) - Analyzing on OS X platform. | |
| Preparing |
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 | |
| class SectionHeaderView: UIView { | |
| // MARK: - Properties | |
| let textLabel: UILabel = { | |
| let label = UILabel() | |
| label.translatesAutoresizingMaskIntoConstraints = false | |
| label.font = .boldSystemFontOfSize(17) |