All this is my first post and I will try to be as precise as possible. I have read numerous articles about protocol / delegate implementation for iOS but all examples failed. Let say I have A and B controller and want to send data from A to B. A.h
@protocol exampleprot <NSObject>
@required
-(void) exampledmethod:(NSString *) e1;
@end
@interface ViewController
{
__weak id <exampleprot> delegate
}
-- A.m in some procedure I try to push
[delegate examplemethod:@"test"]
B.h
@interface test2 : UiViewcontroller <exampleprot>
and in B.m implement method -(void) exampledmethod:(NSString *) e1;
so what I am doing wrong?
See Question&Answers more detail:os