When building forms in your app, it will make the user experience even better when a user can just dismiss the keyboard by tapping anywhere outside a TextField. So how can you achieve this behaviour in SwiftUI?
Per Apple’s documentation UIResponder is an abstract interface for responding to and handling events. So, to dismiss the keyboard, we will utilise this interface to handle the dismissal for us!
To make this behaviour accessible to any view, we will extend the View class and add this capability to all the views.
Once we have this extension created, now every class extending the View class will have this function available to it by calling self.hideKeyboard().
I have been wanting to jump on Flutter ever since I learnt of its existence and realised how big the community around it had gotten.
But,… baby Flutter is about 3 years old! 😱 Why now?
Hold up, wait a second! I gotta get something off my chest! Ahem, ahem… I am very paranoid when it comes to cross-platform and hybrid app development technologies. …
React being component-based, it provides great code reusability and flexibility to programmers in such a way that you can write a UI component once and reuse it all over your codebase. As a result, app development using react becomes faster as recurring UI code can be packaged into components. Additionally, development becomes more efficient as tasks can easily be distributed among different developers.
Scenario: You are writing a web application that has a section which displays a user’s username, email, and phone number. …