Skip to content

Instantly share code, notes, and snippets.

View banjeremy's full-sized avatar

Jeremy Jones banjeremy

  • pnw
  • 16:37 (UTC -07:00)
View GitHub Profile
@diamantidis
diamantidis / ContentView.swift
Created June 21, 2020 12:59
A SwiftUI field with a UIPickerView as a keyboard
import SwiftUI
struct ContentView: View {
@State var selectedIndex: Int? = nil
let options: [String] = ["Option1", "Option2"]
var body: some View {
PickerField("Select an option", data: self.options, selectionIndex: self.$selectedIndex)
}
}
@sindresorhus
sindresorhus / compile-objc.sh
Last active November 25, 2023 21:13
Compile Objective-C on the command-line with clang
# -fobjc-arc: enables ARC
# -fmodules: enables modules so you can import with `@import AppKit;`
# -mmacosx-version-min=10.6: support older OS X versions, this might increase the binary size
clang main.m -fobjc-arc -fmodules -mmacosx-version-min=10.6 -o main