title: How do I create reusable iOS controls?
body: <p>As a new iOS developer I am trying to determine the best approach to creating reusable controls in iOS4+. For example if I wanted to create a customized UIImageView that could be used in multiple other views what is the best approach.</p>
  
  <p>I have created the control including the following files:</p>
  
  <ul>
  <li><strong>MyImageViewController.h</strong> </li>
  <li><strong>MyImageViewController.m</strong></li>
  <li><strong>MyImageViewController.nib</strong></li>
  </ul>
  
  <p>Assume that I want a control that utilizes a .nib file.</p>
  
  <p>How would I do the following:</p>
  
  <ol>
  <li>Create an instance of the custom control in another view, programmatically and via IB?</li>
  <li>How do I structure the custom control so it can expose "events", e.g., ontouch?</li>
  <li>How do I structure the custom control so I can call actions/methods, e.g., loadImage()?</li>
  </ol>
  
  <p>Any insights or reference appreciated.
  Thanks</p>