I am implementing an library(.a), and I want to send notification count from library to app so they can show in their UI, notification count. I want them to implement the only method like,
-(void)updateCount:(int)count{
NSLog(@"count *d", count);
}
How can I send the count from my library continuously so they can use it in updateCount method to show. I searched and come to know about call back functions. I have no idea how to implement them. Is there any other way to do this.
You have 3 options
I think what you want is Delegate
Assume you have this file as lib
TestLib.h
TestLib.m
Then in the class you want to use