I was wondering if someone can explain what is informal protocols in Objective C? I try to understand it on apple documentation and some other books but my head is still spi
Informal protocols are a way to add optional methods to an object by means of category.
So one doubt may arise
Will it become informal protocol if there are any optional methods on protocol itself?
The answer is no.
If the methods are declared in protocol and it is said to be conforming to a class without any usage of category then it's formal protocol.
Note:
Optional methods in protocol were introduced in objective c 2.0 so before that the purpose was achieved through informal protocol I.e by means of category.
Category:
It is a language level feature meant to be alternative for sub classing aka inheritance.
I hope it sheds some lime light on this..