Adding a click event to a UIView is something that is required most of the time. For views like UIButton, we can connect an IBAction with the event type and detect the click events but sometimes we need it for Lable or even other views. …
This particular script will help you to implement a Click listener to all UIView and its subclasses in a clean way. …
As we all know, Classes are reference type whereas Structures and Enumerations are of a value type in swift. What does that mean is that a class object shares a single instance of the object and passes the same reference if passed to any function or new object whereas the value type is the one which creates a copy of it and passes only the value. …
Recently, while working with swift I came up with a use case where I need to modify the variable passed as an argument to a function. …
Object creation is a heavy process. When we create a class object, all the public and private properties of that class are initialised inside the constructor. …
It is a very common use case where we want to return two values from a method, can be either of same data type or can be of different data types. …