Apart from other languages, when you write a class in Swift, It should have a initialiser. To solve this we have to write init() function in that particular class. Just like below. For example, look at the below class. Here […]
The following is a sample code to do this. Simply copy and paste.