How To Hide Keyboard In iOS Hi, In this post, I'll show you how to hide keyboard in your iOS apps. So, lets get started and see how to do it. You can also watch this tutorial on my YouTube channel here: How To Hide Keyboard in iOS using Swift ? First of all, open your Xcode and create a new Single View Application. Now, give some name to your product like "HideYourKeyboard", and make sure to choose Swift as the language. Now, Go to Main.storyboard and drag a text field on it. Add some constraints on this text field as shown in the image below: Now, open the Assistant Editor and make sure both storyboard and view controller files are visible as shown in the picture below: Now, ctrl-drag your text field to viewcontroller.swift file and create its outlet. Once done, then close this section and open your viewcontroller.swift file. Here, first of all add UITextFieldDelegate method as shown in the image below. Now, we'll add 2 funct...
Comments
Post a Comment