0

I am trying to use my customTextfield in other screen.. I'm trying to make keyboard appear when textField is tapped.. I'm using focusState here to do so.. but keyboard pop is not working.. Note: tapGesture is working as it prints "hello" when it is tapped. if this is due to layout or view hierarchy problem, i m happy to know your views/thought on it.

TextField(placeHolder, text: $text)
    .autocorrectionDisabled(true)
    .focused($isFocused)
    .foregroundColor(color)
    .onTapGesture {
        isFocused = true
        print("hello")
    }
Timmy
  • 4,098
  • 2
  • 14
  • 34
  • 1
    For me the keyboard shows up. Have you tried it on an actual device or only in the simulator? Because in the simulator by default the hardware keyboard gets used. If you want to see the software keyboard as well you can toggle it with command + k. – Torke Aug 29 '23 at 08:21

0 Answers0