Skip to content

Instantly share code, notes, and snippets.

View sphilipakis's full-sized avatar

stephane Philipakis sphilipakis

View GitHub Profile
@sphilipakis
sphilipakis / GeometryReaderInList.swift
Created June 8, 2019 16:26
Use GeometryReader in List (stretchy headers, etc...)
import SwiftUI
struct ContentView : View {
var body: some View {
List {
HeaderView()
ForEach(0...20) { n in
Text("Row #\(n)")
}
}
@sphilipakis
sphilipakis / ProtocolAndDI.swift
Last active July 1, 2017 23:30
Swift dependency injection... without dependency injection
//: Playground - noun: a place where people can play
import Foundation
protocol MyService {
func doSomething()
}
protocol MyServiceClient {
var service : MyService { get }