How To Use Text Fields in SwiftUI (2024)

Sdílet
Vložit
  • čas přidán 18. 05. 2024
  • Learn how to use a SwiftUI TextField to capture user input. This tutorial contains sample code and common use cases for text fields.
    👋 Our "Launch Your First App" program will help you build up your iOS skills to publish your very own feature rich app even if you’re a beginner starting from scratch. codewithchris.com/plus
    In this SwiftUI TextField tutorial, we’ll cover:
    00:00 Intro
    00:12 A basic usage example
    03:10 Responding to text field events such as on submit
    03:56 Handling focus states on a single text field
    05:41 Handling focus states on a multiple text fields
    Download sample code for all SwiftUI components here:
    cwc.to/swiftui-kit
    Article version of this tutorial:
    codewithchris.com/swiftui/swi...
    For tutorials of other SwiftUI components, check out our playlist here:
    • SwiftUI Components

Komentáře • 20

  • @CodeWithChris
    @CodeWithChris  Před 2 dny

    👋 Our "Launch Your First App" program will help you build up your iOS skills to publish your very own feature rich app even if you’re a beginner starting from scratch. codewithchris.com/plus

  • @tarindau
    @tarindau Před 13 dny

    As always..... BRILLIANT. Thank you 🙏

    • @CodeWithChris
      @CodeWithChris  Před 13 dny +1

      Glad it was helpful! Thanks for watching! - Iñaki

  • @Free_Time424
    @Free_Time424 Před 2 měsíci

    Thank you! You have a natural teaching talent. Thank you again.

  • @danielcrompton7818
    @danielcrompton7818 Před 2 měsíci

    Hey Chris, thanks so much for the explanation on bindings!!

    • @CodeWithChris
      @CodeWithChris  Před 2 měsíci +1

      Glad it was helpful! Thanks for watching! - Iñaki

  • @PhG1961
    @PhG1961 Před 2 měsíci

    Amazing, great video! Useful, comprehensive and entertaining too. As usual!

    • @CodeWithChris
      @CodeWithChris  Před 2 měsíci

      Glad you enjoyed it! Thanks for learning with us! - Iñaki

  • @CliveZm
    @CliveZm Před 2 měsíci

    Wow I wanna Learn More ❤

  • @RobertSantini
    @RobertSantini Před 2 měsíci

    Awesome Chris.

    • @CodeWithChris
      @CodeWithChris  Před 2 měsíci

      Glad it was helpful! Thanks for watching! - Iñaki

  • @user-jz8op2dc4e
    @user-jz8op2dc4e Před měsícem

    Why can you input content in the canvas preview? How do I set it up?

  • @user-zu6il8md2o
    @user-zu6il8md2o Před 2 měsíci

    what about changing the size of the textfield

  • @mohamethseck
    @mohamethseck Před 2 měsíci +1

    Do you have any plans for videos on animations?

  • @amanterobot
    @amanterobot Před 2 měsíci

    Hi there. Any of you guys got the paid course by Chris? I'm really interested in but I'm scared of not being enough good to understand how to do things. I'm learning few things, basic classic apps like card games (the one by Chris is soo good and easy to understand), a xylophone etc... in swift but also in Flutter. There are things I saw on CZcams, tutorials, where to do the same things in swift/swiftUI the code was to me soooo complicated while in Flutter I could get the point with less pain. Really want to understand how things work in swift but is it just me or ios native is harder than Flutter?

    • @Hgvpuncher
      @Hgvpuncher Před měsícem +1

      yeah i started with his courses as well and then moved along once i understood the basics. He was the only one i was able to understand how SwiftUI fundamentals works and this is because he is speaking slow and explain everything unlike the other youtubers who goes very fast and skip vital explanations just to save time

    • @amanterobot
      @amanterobot Před měsícem

      @@Hgvpuncher thanks for your kind reply. Appreciate it 🙏🏻 ciao! 👋🏻 🇮🇹

  • @RahulGupta-cz7of
    @RahulGupta-cz7of Před 2 měsíci

    There is no option to download the Kit on the website

  • @codelaby
    @codelaby Před 2 měsíci

    Hmm, try keyboard in window, my test seems to leak, loses focus, hides keyboard and opens when new field appears in next, breaking continuity