Skip to content

Instantly share code, notes, and snippets.

👨‍💻

Justin Stanley jstheoriginal

👨‍💻
Block or report user

Report or block jstheoriginal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jstheoriginal
jstheoriginal / SearchBar.swift
Created Jun 20, 2019
A simple SwiftUI search bar
View SearchBar.swift
struct SearchBar : View {
@Binding var searchText: String
var body: some View {
HStack {
Image(systemName: "magnifyingglass").foregroundColor(.secondary)
TextField(
$searchText,
placeholder: Text("Search")) {
UIApplication.shared.keyWindow?.endEditing(true)
You can’t perform that action at this time.