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
extension UIImage { | |
func crop(rect: CGRect) -> UIImage? { | |
if let image = self.cgImage, let cropped: CGImage = image.cropping(to: rect) { | |
return UIImage(cgImage: cropped) | |
} | |
return nil | |
} | |
} |
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
extension Decodable { | |
static func parse(json: String) -> Self? { | |
guard let url = Bundle.main.url(forResource: json, withExtension: "json"), | |
let data = try? Data(contentsOf: url), | |
let output = try? JSONDecoder().decode(self, from: data) else { | |
return nil | |
} | |
return output | |
} |
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
tap 'homebrew/cask' | |
tap 'homebrew/cask-drivers' | |
tap 'homebrew/cask-fonts' | |
tap 'homebrew/cask-versions' | |
tap 'homebrew/core' | |
tap 'homebrew/boneyard' | |
tap 'homebrew/dev-tools' | |
tap 'homebrew/bundle' | |
tap 'homebrew/services' |
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
# Customize this file, documentation can be found here: | |
# https://docs.fastlane.tools/actions/ | |
# All available actions: https://docs.fastlane.tools/actions | |
# can also be listed using the `fastlane actions` command | |
# Change the syntax highlighting to Ruby | |
# All lines starting with a # are ignored when running `fastlane` | |
# If you want to automatically update fastlane if a new version is available: | |
# update_fastlane |
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 | |
typealias Provider = NSObject & UIApplicationDelegate | |
class ComposedProvider: Provider { | |
// MARK: Property(ies). | |
private var providers: [Provider] |
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
public struct Extension<Base> { | |
public let base: Base | |
public init(_ base: Base) { | |
self.base = base | |
} | |
} | |
public protocol ExtensionCompatible { | |
associatedtype Compatible | |
var ex: Extension<Compatible> { get set } |
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
@startuml | |
class EdgeStyle << (E, orange) >> { | |
none | |
raised | |
depressed | |
uniform | |
dropShadow | |
--- | |
+ value: CFString |
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
@startuml | |
class SubtitleStylePlugin { | |
+ name: String | |
--- | |
init(context: UIObject) | |
--- | |
+ bindEvents() | |
+ bindContainerEvents() | |
+ bindPlaybackEvents() |
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 ColorHex: ExpressibleByStringLiteral { | |
// MARK: - Type Alias. | |
typealias StringLiteralType = String | |
// MARK: - Private Property(ies). |
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 Clappr | |
import UIKit | |
class UIPlaybackTypePlugin: UICorePlugin { | |
override class var name: String { "UIPlaybackTypePlugin" } | |
private var label: UILabel = { | |
let label = UILabel() | |
label.translatesAutoresizingMaskIntoConstraints = false |
OlderNewer