title: Creating sections for years from array of dates
body: <p>I have an array that I need to display in a <code>UITableView</code> in sections.</p>
  
  <p>I am currently displaying the objects in date order all under one section but I need to section them by year and I'm not sure how to go about doing it.</p>
  
  <p>My object is something like...</p>
  
  <pre><code>@interface MyEvent : NSObject
  
  @property NSDate *date;
  @property NSString *title;
  @property NSString *detail;
  
  @end
  </code></pre>
  
  <p>My array is an array of these objects in date order.</p>
  
  <p>Can I do this straight from this array or do I need to separate the array into a 2D array.</p>
  
  <p>i.e. An NSArray of NSArrays where each object in the second NSArray is in the same year.</p>