Skip to content

Instantly share code, notes, and snippets.

View michaelbiggs's full-sized avatar

Michael Biggs michaelbiggs

View GitHub Profile
@michaelbiggs
michaelbiggs / closure.swift
Created February 11, 2023 16:48
Swift Closure Syntax
import UIKit
func createView(_ closure: () -> Void) -> UIView {
closure()
return UIView()
}
let exampleClosure: () -> Void = { print("Hello, World!") }
let exampleView = createView(exampleClosure)