We are implementing a iOS framework which will be used by third-party developers. This framework need to provide few screens for user login(LoginView) and profile. Framework has a Helper class where it interacts with server APIs, e.g connect(), onConnection() and here onConnection() is callback method using delegate.
The third-party application is adding our framework and using LoginView as initial screen.
When connect(), onConnection() are part of LoginView, everything is working fine.
Where as, if connect(), onConnection() are part of Helper class, OnConnection() callback is not getting called.
This could be solved by implementing proper way of delegation, I tried using making Helper class as delegator of LoginView. But it is not working.
Can somebody help us?
Try the following: Edited my previous answer to the suggestion given
If any issues please comment shall be happy to help. Enjoy coding.