大多数时候我这样做:
self.someVC = [myVC alloc] initWithFrame:frame];
self.someVC.delegate = self;
有没有办法自动设置委托变量?
-(void)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
self.delegate = [the object that is calling initWithFrame];
..