SwiftUI向键盘添加按钮(键盘按钮)

时间:2020-10-07 04:22:21

标签: swift swiftui

在UIKit上,我们可以向键盘添加按钮,例如:

let button = UIButton(frame: CGRect(x: 0, y: 0, width: view.frame.size.width, height: 60))
      button.backgroundColor = UIColor.blue
      button.setTitle("NEXT", for: .normal)
      button.setTitleColor(UIColor.white, for: .normal)
      button.addTarget(self, action: #selector(self. yourButton), for: .touchUpInside)
textField.inputAccessoryView = button

但是在SwiftUI上会如何?

0 个答案:

没有答案