Skip to content

Instantly share code, notes, and snippets.

View guseducampos's full-sized avatar

Gustavo Campos guseducampos

  • El Salvador
View GitHub Profile
@guseducampos
guseducampos / PickerView.swift
Last active February 19, 2019 20:23
Small abstraction to handle picker view elements with a custom object.
import Foundation
import ObjectiveC
import UIKit
protocol PickerViewItem: Equatable {
typealias TextProperty = KeyPath<Self, String>
typealias SelectProperty = KeyPath<Self, SelectItem>