I got a view controller class (MyViewController) that deals with a UIView subclass (MyView). I don't want to let any class except the view controller class know about the UIView subclass, so I cannot import MyView.h
in MyViewController.h
.
So, in MyViewController.m
, I put
#import "MyViewController.h"
#import "MyView.h"
@interface MyViewController (PrivateObjects)
MyView *myView;
@end
...
However, to get feedback from MyView, I use a delegate. That delegate has to implement the MyViewDelegate
protocol.
How can I implement the MyViewDelegate
protocol inside MyViewController
without having to #import
MyView.h
in MyViewController.h
?