I have a class search bar with a delegate didSelectString. I have an class A that implements the delegate and a class B that implements the delegate.
However only the de
The delegation is a single messaging protocol. You'll need to use NSNotifications if you want to message multiple objects of a change.
You can pass an object using notifications centre like so:
NSDictionary *userInfo = @{@"myObject" : customObject};
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc postNotificationName:@"myNotificationString" object:self userInfo:userInfo];
When wanting to listen for notifications
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myCustomObserver:)name:@"myNotificationString" object:nil];
And setting up the selector
-(void)myCustomObserver:(NSNotification *)notification{
CustomObject* customObject = notification.userInfo[@"myObject"];
}