If ViewController‘s view is set to MyView


And ViewController maintains a pointer to it’s view (set up via storyboards)
@property (weak, nonatomic) IBOutlet MyView *v;
Where in ViewController, should the following take place?
UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc]
initWithTarget:v action:@selector(pan:)];
[v addGestureRecognizer: panGesture];
viewDidLoadis a good place for this kind of initialization, since the view hierarchy will have been loaded into memory at that point, whether it was loaded from a storyboard or nib, or created programmatically.