I have some bluetooth
class that needs to be alive during all views .
That means, that i have to call functions in this class from different views, and ALSO get delegates from this class to different views .
So , i have to initialise it once to create connection, than later, i have to use it again from different views(classes) and register to get notifications from it.
I was thinking about a singleton
, that HE will create an instance of that bluetooth class, and i can access him from anywhere .
But, i would also like that any view can get delegates
from it .
How would i do that ? i have read What should my Objective-C singleton look like?
But maybe singleton
is not what i need ?
How can you create a class to always be alive, and register to get delegates from it from anywhere ?
(how can it be done with app delegate
class ? )