title: How to programmatically set custom class?
body: <p>I use <code>-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
  </code> in my view controller to get touches on view handled by the view controller. But is it possible to use this same method on a sub view added on the view handled by this view controller to get touches from it?</p>
  
  <p>I have tried to create .m and .h files for such views so that I can get touches there using the <code>-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
  </code> method but that only work if I set the custom class in the storyboard but is not possible as the view was made programmatically. So is it possible to some way set the custom class in my mainViewController itself. So the compiler knows what view this .m and .h files are associated?</p>
  
  <p>I know there are other methods like -hitTest: and tap gesture recognizers but i am interested in -touchBegan:</p>
  
  <p>Thanks for looking :)</p>