title: How to convert this Swift line into Objective-C syntax
body: <p>Need to convert this to Objective-C syntax, can't seem to find a way to convert it.</p>
  
  <pre><code>   private class func components(fromDate fromDate: NSDate) -&gt; NSDateComponents! {
          return NSCalendar.currentCalendar().components(NSDate.componentFlags(), fromDate: fromDate)
      }
  </code></pre>
  
  <p>Tried this:</p>
  
  <pre><code>- (NSDateComponents *) componentsFromDate: (NSDate *) fromDate {
      return [[NSCalendar currentCalendar] componentsFromDate: [NSDate componentFlags] : fromDate];
  }
  </code></pre>
  
  <p>This was defined before:</p>
  
  <pre><code>- (NSCalendarUnit *) componentFlags {
      return NSCalendarUnitYear, NSCalendarUnitMonth, NSCalendarUnitDay, NSCalendarUnitWeekOfYear, NSCalendarUnitHour, NSCalendarUnitMinute, NSCalendarUnitSecond, NSCalendarUnitWeekday, NSCalendarUnitWeekdayOrdinal, NSCalendarUnitWeekOfYear;
  }
  </code></pre>
  
  <p>All this in a category I created:</p>
  
  <pre><code>@implementation NSDate (AFDateHelperObjC)
  @end
  </code></pre>