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
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 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 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 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 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 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 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 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) |
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 | |
class LineView: UIView { | |
override func sizeThatFits(size: CGSize) -> CGSize { | |
return CGSize(width: size.width, height: intrinsicContentSize().height) | |
} | |
override func intrinsicContentSize() -> CGSize { | |
return CGSize(width: UIViewNoIntrinsicMetric, height: 1 / max(1, traitCollection.displayScale)) | |
} |