I am trying to define my protocol so that the class implementing it has to also be a UIViewController.
So i typed the following code into a header file:
#import <UIKit/UIKit.h>
#import <UIKit/UIViewController.h>
#import <EventKit/EventKit.h>
#import <EventKitUI/EventKitUI.h>
@protocol MySuperProtocol<UIViewController> // <-- here
@property(nonatomic, weak, nullable) id<EKEventViewDelegate> delegate;
@end
I always get the error saying that:
Cannot find protocol declaration for 'UIViewController'
If i replace UIViewController with NSObject, code compiles. If i remove the <> inheritance after the protocol, code compiles.
I tried all combinations of
#import <UIKit/UIKit.h>
#import <UIKit/UIViewController.h>
to no avail.
What am i doing wrong?