I have a view controller class (MyViewController) that deals with a subclass of UIView (MyView). I do not want any class other than the view controller class to know about the UIView subclass, so I cannot import MyView.hinto 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. This delegate must implement the protocol MyViewDelegate.
How can I implement the protocol MyViewDelegateinternally MyViewControllerwithout having #import MyView.hin MyViewController.h?
ryyst source
share