New in SwiftUI 3: New in SwiftUI 3: Toolbar on Keyboard in SwiftUI 3, iOS 15

DevTechie
DevTechie
Oct 2, 2021 · 3 min read

SwiftUI introduced ToolbarItem with iOS 14. ToolbarItem represents an item which can be placed in navigation bar or toolbar . Starting iOS 15 ToolbarItem can attach item on top. of keyboard. This gives us ability to add views above the keyboard.

Let’s look at a simple example

struct KeyboardToolbar: View {

@State private var message = ""

var body: some View {
VStack {
List(0..<50) { idx in
Text("Item #\(idx)")…