Here , I have implemened the method inside extension which can be used by number of controller without redefining the code for same method in each view controller after confirming to delegate. I have created sample Protocol class and extension for same where I have defined the method. In SecondVC , I have created a instance of Protocol and calling the protocol method inside the button click. On button click MainVC will appear and delegate method will be called.
garg204/SampleProtocolDelegateExtension
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|