Skip to content

Instantly share code, notes, and snippets.

View davidkneely's full-sized avatar

David Neely davidkneely

View GitHub Profile
//TODO: Make this work
static func saveImageToFirebase(withImage inputImage: UIImage, andPhotoIsForProfile inputPhotoIsForProfile: Bool, andUserId inputUserId: String) {
// Get a reference to the storage service using the default Firebase App
let storage = Storage.storage()
// Create a storage reference from our storage service
let storageRef = storage.reference()
var imageName = ""
@davidkneely
davidkneely / generics001.swift
Created July 7, 2017 10:57
Here is the playground I shared at the meetup tonight.
//: Playground - noun: a place where people can play
import UIKit
// source: The Swift Programming Language (Swift 4)
// https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Generics.html
/*
Does everyone know what a Type is?
@davidkneely
davidkneely / Enums.swift
Created July 3, 2017 07:53
De- "stringifying" a stringly typed enumeration.
import UIKit
struct TrafficLight {
enum TrafficLightState: Int {
case proceed = 1
case proceedWithCaution = 13
case stop = 9
var lightColor: UIColor {
@davidkneely
davidkneely / classStructEnum.playground
Created May 19, 2017 09:49
Write up for Hawaii iOS Developer Meetup: Enums, Structs, and Classes
//: Playground - noun: a place where people can play
import UIKit
var str = "Hello, playground"
/*
Notes form last week to review before tonight's session:
@davidkneely
davidkneely / errors001.playground
Created May 12, 2017 06:05
Hawaii iOS Developer Meetup 5/11/2017 - Optionals, Results, and Errors
//: Playground - noun: a place where people can play
import UIKit
// Ch 20
// Big Nerd Ranch Swift Programming Book
// 2017_5_12
/*
@davidkneely
davidkneely / closures.playground
Created May 5, 2017 10:05
closures001 talk 2017_5_4 at Hawaii iOS Developer Meetup
//: Playground - noun: a place where people can play
// Hawaii iOS Developer Meetup
// Closures
// 2017_5_4
// 6pm
import UIKit