i have two views with view1 calling view2. i need to pass data from view2 back to view1. so i am attempting to set up a delegate. here’s what i got in view controller 2:
.h file
@protocol addEventDelegate <NSObject>
-(void) setAddedEventFlag:(BOOL) hasAddedEvent;
@end
@interface AddEventViewController : UIViewController <UITextFieldDelegate, UITextViewDelegate, UIPickerViewDelegate, UIPickerViewDelegate>
@property (weak, nonatomic) id delegate; //changed from strong to weak
i then @synthesize delegate in the .m file
when try to include the addEventDelegate for the first view controller, xcode can not find it:
.h file
#import "AddEventViewController.h"
@interface FieldReportViewController : UIViewController <UITextFieldDelegate,
UITextViewDelegate, UIPickerViewDelegate, UIPickerViewDelegate, addEventDelegate>
i get the error: “Cannot find protocol declaration for ‘addEventDelegate'”.
what is wrong?
EDIT:

//code

ERRORS:

Solved the issue. i had an #import loop. I was #importing all my classes in my .h files. i changed to @Class in .h file and moved the #import’s to the .m files and works like a charm now.