Skip to content

Instantly share code, notes, and snippets.

Thomas Durand Dean151

View GitHub Profile
Dean151 / CryptoKitLottery.swift
Last active Jun 25, 2019
Generate Lottery Numbers using CryptoKit
View CryptoKitLottery.swift
// Written by Thomas Durand (c)2019 ; all right reserved
// See for more context
/// Represent one `k among n` operation
struct Draw {
/// The number of number to draw (ie k)
let draw: UInt
/// The range of numbers to draw within (ie n)
let among: ClosedRange<Int>
Dean151 / ReusableView.swift
Created Nov 19, 2016
Reusable view mechanism with Swift3 and Protocol Oriented Programming
View ReusableView.swift
//: Playground - noun: a place where people can play
import XCPlayground
import UIKit
protocol ReusableView {
/// The index of the current view to compare when this view is visible
var index: Int { get }
/// A static method that will be used to instanciate a new ReusableView when needed
You can’t perform that action at this time.