SwiftUI - Keyboard Toolbar buttons not showing

Viewed 1041

I am using the example from HWS https://www.hackingwithswift.com/quick-start/swiftui/how-to-add-a-toolbar-to-the-keyboard but having no luck getting buttons to show above the keyboard.

XCODE 13.2.1 / Physical device running iOS 15.3.1

Is this a known issue ? Thankyou!

import SwiftUI

struct KeyboardView: View {
    @State private var name = "Neil"

    var body: some View {
        TextField("Enter your name", text: $name)
            .textFieldStyle(.roundedBorder)
            .toolbar {
                ToolbarItemGroup(placement: .keyboard) {
                    Button("Click me!") {
                        print("Clicked")
                    }
                }
            }
    }
}
0 Answers
Related