I have some view controller called mainContainer , he than import some other view controller called myPills, and add it as a subview .
the mainContainer also has a protocol to send delegates to the myPills class, and it looks like :
//mainContainer.h
@protocol mainScrollerDelegate <NSObject>
-(void)function;
@end
@interface MainContainerView : UIViewController<UIScrollViewDelegate>
Than, obviously in the myPills class i cant import the mainContainer view, but i do want to register to the mainContainer delegates.
so in myPills
@interface MyPillsView : UIViewController <mainScrollerDelegate>
will give error on compile .
I have read this,and tried to move the import to be under the delegates-no success.(same error that delegate was undeclared)
Cannot find protocol declaration
How can you listen to a delegate in classB from classA , where classA is importing classB , so classB cant import A back ?