Protocol in swift

In Swift, delegates are implemented using a protocol declaration For example, if you have two classes, a parent and a child: class Parent { } class Child { } And if you want to notify the Parent,  a change from Child, you would use protocol: Create A Protocol: protocol ChildDelegate { func childDidSomething() } In the child class we need…

Optional’s, Wrap and Unwrap in Swift

An Optional is basically means that the variable can be nil Example: var itCanBeNil: String? = “You can make me nil” itCanBeNil = nil Question Mark(?) indicates the fact that itCanBeNil Variable can be nil Let’s try  to make nil a variable which declared without Optional ? Example: var itCantBeNil: String = “You can’t make me nil” itCantBeNil = nil  //Compiler Throws…

Marriage Cassette

Hello aunt!!! What’s special? , You sound great! Ha ha ha, My marriage fixed on coming month. Wow, that sounds great!!! You need to come; we will be waiting for you. Sure beta. Giving the phone to mom, Hey Sharada hi Ha hi, Vasundhara, You must come for my  daughter marriage, I will come for sure,…