Skip to content

Instantly share code, notes, and snippets.

@calebhicks
calebhicks / DateHelpers.swift
Created October 21, 2015 17:13
Swift Date Helpers
extension NSDate
{
func isGreaterThanDate(dateToCompare : NSDate) -> Bool
{
//Declare Variables
var isGreater = false
//Compare Values
if self.compare(dateToCompare) == NSComparisonResult.OrderedDescending
{
@calebhicks
calebhicks / Stack.swift
Last active June 22, 2018 16:29
A simple Core Data written in Swift. Inspired by the fantastic Core Data book by Florian Kugler and Daniel Eggert at https://www.objc.io/books/core-data/
//
// Stack.swift
//
import Foundation
import CoreData
class Stack {
static let sharedStack = Stack()
@calebhicks
calebhicks / FirebaseType.swift
Created October 28, 2015 22:34
A simple Swift protocol for Firebase objects with default save() and delete() implementations.
//
// FirebaseType.swift
//
import Foundation
import Firebase
protocol FirebaseType {
// properties