I've been trying to make a custom keyboard within SwiftUI. The instructions about creating a custom keyboard, primarily written in UIKit causing some struggles with my SwiftUI code in configuration to fundamental buttons (Delete, Space and NextKeyboard).
I want to add this target to the SwiftUI Button, Is there any legit way to do it.
UIKit
@IBOutlet var nextKeyboardButton: UIButton!
self.nextKeyboardButton.addTarget(self, action: #selector(handleInputModeList(from:with:)), for: .allTouchEvents)
SwiftUI
struct KeyBoardView: View {
var body: some View {
Button(action: {
//What should I add to this action in order to perform like above UIKit code
}, label: {Image(systemName:"globe").imageScale(.large)})
}
}
Thank you in advance as a part of the SwiftUI community!