Skip to content

Instantly share code, notes, and snippets.

Charlton Provatas cprovatas

Block or report user

Report or block cprovatas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cprovatas
cprovatas / BlockBasedSelector.h
Last active May 24, 2019
Block-Based Selectors in Swift
View BlockBasedSelector.h
//
// BlockBasedSelector.h
//
// Created by Charlton Provatas on 11/2/17.
// Copyright © 2017 CharltonProvatas. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface BlockBasedSelector : NSObject
@cprovatas
cprovatas / gist:8d4dafaa13da058da32b0f68f625b424
Created Oct 19, 2017
Solution to eliminate boilerplate code when Implementing Equatable for Associated Value Enums
View gist:8d4dafaa13da058da32b0f68f625b424
import UIKit
protocol AutoEquatableEnum {
static func == (lhs: Self, rhs: Self) -> Bool
}
extension AutoEquatableEnum {
static func == (lhs: Self, rhs: Self) -> Bool {
return lhs.data == rhs.data
}
You can’t perform that action at this time.