I’ve create a subview using following code:
-(void) viewDidLoad
{
CGRect subviewRect = CGRectMake(0, 0, 320, 320);
mysubview = [[UIView alloc] initWithFrame:subviewRect];
[mysubview setBackgroundColor:[UIColor whiteColor]];
[self.view addSubview:mysubview];
}
and I want to draw some graphics in this sub view , so I think I need to access to its drawRect function but how can I hook drawRect() to mysubview programmatically ?
Should be
Where
AustinPowersViewis a subclass ofUIView, in which you have overriddendrawRect: