Skip to content

Instantly share code, notes, and snippets.

View andyyhope's full-sized avatar
💭
Please find another reviewer

Andyy Hope andyyhope

💭
Please find another reviewer
View GitHub Profile
import Foundation
// MARK: - Protocol
public protocol Notifier {
associatedtype Notification: RawRepresentable
}
public extension Notifier where Notification.RawValue == String {
// Swift: Syntax Cheat Codes
// ↑ ↑ ↓ ↓ ← → ← → B A
//
// Author: Andyy Hope
// Twitter: @andyyhope
// Medium: medium.com/@andyyhope
import UIKit
// Swift: Typecasing
// Enums as data models?
//
// Author: Andyy Hope
// Twitter: @andyyhope
// Medium: medium.com/@andyyhope
import Foundation
// MARK: - Models
//:
//: UserDefaultable.swift
//:
//: Created by Andyy Hope on 18/08/2016.
//: Twitter: @andyyhope
//: Medium: Andyy Hope, https://medium.com/@AndyyHope
import Foundation
// MARK: - Key Namespaceable
//:
//: UIView Animation Syntax Sugar
//:
//: Created by Andyy Hope on 18/08/2016.
//: Twitter: @andyyhope
//: Medium: Andyy Hope, https://medium.com/@AndyyHope
import UIKit
extension UIView {
struct Foo { }
enum Bar {
case hero(Any)
}
let foo = Foo()
let bar = Bar.hero(foo)
if case let .hero(foo) = bar, foo is Foo {