Skip to content

Instantly share code, notes, and snippets.

@dubemike
dubemike / FeatureFlag.swift
Last active December 11, 2019 06:30
A lightweight enum based Feature flag system
enum FeatureFlag: String, CaseIterable {
case featureOne
}
extension FeatureFlag {
var isEnabled: Bool {
switch self {
case .featureOne:
if isRunningInAppStore() {
return false
}
@dubemike
dubemike / Genrics+CellReuse.swift
Created June 21, 2018 10:12
An easier way to dequeue cells in iOS
import Foundation
import UIKit
public protocol ReusableView: class {
static var defaultReuseIdentifier: String { get }
}
extension ReusableView where Self: UIView {
public static var defaultReuseIdentifier: String {
return String(describing: self)
}