title: Swift using delegate written in Objective-C
body: <p>Im using a custom made class with delegate methods written in objective-c in a swift file. Bridging header is setup thus I am able to refer to classes in .m and .h files in .swift files. Here comes a problem, I was trying to include delegate method to the swift file, and it shows me message <strong>Type '<em>YourClassName</em>' does not conform to protocol '<em>YourDelegateWrittenInObjC</em>'</strong>. When I <strong>Command + Left Click</strong> on the error message, some message with <strong>gray background</strong> comes out on the delegate method.</p>
  
  <p>Wish someone could help me solving this problem. A print screen is provided to help debug:</p>
  
  <p><img src="https://i.stack.imgur.com/ky41q.png" alt="enter image description here"></p>
  
  <p>Edited (include delegate declaration):</p>
  
  <p>Here you go:</p>
  
  <pre><code>@protocol CollapseClickDelegate
  @required
  -(int)numberOfCellsForCollapseClick;
  -(NSString *)titleForCollapseClickAtIndex:(int)index;
  -(NSString *)leftTitleForCollapseClickAtIndex:(int)index;
  -(NSString *)rightTitleForCollapseClickAtIndex:(int)index;
  -(UIView *)viewForCollapseClickContentViewAtIndex:(int)index;
  
  @optional
  -(UIColor *)colorForCollapseClickTitleViewAtIndex:(int)index;
  -(UIColor *)colorForTitleLabelAtIndex:(int)index;
  -(UIColor *)colorForTitleArrowAtIndex:(int)index;
  -(void)didClickCollapseClickCellAtIndex:(int)index isNowOpen:(BOOL)open;
  
  @end
  </code></pre>