There are two classes A and B :
@interface A : NSObject < UIAlertViewDelegate > { ... } @end
@interface B { ... }
A will use B via creating B and use it.
In B, there are chances to create UIAlertViewDialog, and do some user interactions.
I think that it is reasonable to implement clickedButtonAtIndex in class A, because A is declared to confirm to UIAlertViewDelegate. But the true is that we should implement in B.
- (void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)buttonIndex { //bla bla }
I really can not understand what is the true cause to confirm protocol like this case.
Thanks in advance.