Problem with Delegation

I am entering the code exactly as given in the book (from page 76 to 78) starting from declaring the UITextFieldDelegate in COnversionViewController to writing function exactly as given but my delegation protocol is not working. I am not seeing the results of print output on my console as mentioned in page 77 code and also inspite of entering the code as given in page 78 , I am still able to enter multiple decimal points. But surprisingly when I am running the WorldTrotter file , which is part of the code supplied with the book , it’s working properly. Any idea why this is happening. I checked both the codes (my own versus that of the book) thrice and could not locate any difference between mine and the code file supplied with the book.

Hi Guys,
I figured out the issue, I was not connecting the textField to ViewController (the yellow box up) and clicking on delegate. So to make a delegate it’s not only required to declare programmatically but also to make connections. Thanks

As you will discover, to programmatically set a delegate it’s as simple as writing: