Last active
March 23, 2024 18:13
-
-
Save alexandersandberg/41411980f2e828852739bab20963f718 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// Playground | |
// | |
// Created by Alexander Sandberg on 23.03.24. | |
// | |
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
NavigationStack { | |
Text("Hello, World!") | |
.toolbar { | |
ToolbarItem(placement: .principal) { | |
HStack { | |
Spacer() | |
TextField("Search...", text: .constant("")) | |
.textFieldStyle(.roundedBorder) | |
.frame(maxWidth: 300) | |
Spacer() | |
} | |
} | |
} | |
} | |
} | |
} | |
#Preview { | |
ContentView() | |
} |
Author
alexandersandberg
commented
Mar 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment