HomeiOS DevelopmentAdd hole to the keyboard toolbar

Add hole to the keyboard toolbar


Since iOS 26, the toolbar on the keyboard is not towards the keyboard, there is a small hole as seen right here on Safari:
Add hole to the keyboard toolbar

However in my app it reveals up like this, with out the hole:
enter image description here

This is my code:

.toolbar {
    ToolbarItem(placement: .keyboard) {
        HStack {
            Button(motion: {
                change focusedField {(...)}
            }) {
                Picture(systemName: "chevron.up")
                    .padding()
            }
            .disabled(focusedField == .firstField)
            
            Button(motion: {
                change focusedField {(...)}
            }) {
                Picture(systemName: "chevron.down")
                    .padding()
            }
            .disabled(focusedField == .lastField)
            
            Spacer()
            
            Button {
                focusedField = nil
            } label: {
                Picture(systemName: "checkmark")
                    .padding()
            }
        }
    }
}

I attempted utilizing an ToolbarItemGroup as a substitute, a number of ToolbarItem with out the HStack, including padding to any part or spacing in a VStack however that primarily simply made the toolbar itself thicker. Is there a built-in Swift toolbar for the keyboard or am I doing one thing flawed?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments