title: Swift class trying to implement a Objective-C protocol failed with optional method conflict error
body: <p>I have an Swift iOS project that uses the MLPAutoCompleteTextField library which is written in Objective-C.  Here is the <em>MLPAutoCompleteTextFieldDataSource</em> protocol my Swift class is trying to implement:</p>
  
  <pre><code>@protocol MLPAutoCompleteTextFieldDataSource &lt;NSObject&gt;
  @optional
  - (void)autoCompleteTextField:(MLPAutoCompleteTextField *)textField
    possibleCompletionsForString:(NSString *)string
               completionHandler:(void(^)(NSArray *suggestions))handler;
  
  
  - (NSArray *)autoCompleteTextField:(MLPAutoCompleteTextField *)textField
    possibleCompletionsForString:(NSString *)string;
  
  @end
  </code></pre>
  
  <p>Here is my Swift class:</p>
  
  <pre><code>class MyAutocompleteDataSource : NSObject, MLPAutoCompleteTextFieldDataSource {
      override func autoCompleteTextField(textField : MLPAutoCompleteTextField, 
  possibleCompletionsForString : String)
                      -&gt; Array&lt;String&gt;  {
          return nil
      }
  }
  </code></pre>
  
  <p>After compiling, these two errors are reported:</p>
  
  <p><em>Error:(17, 23) method does not override any method from its superclass</em></p>
  
  <p><em>Error:(17, 23) Objective-C method 'autoCompleteTextField:possibleCompletionsForString:' provided by method 'autoCompleteTextField(</em>:possibleCompletionsForString:)' conflicts with optional requirement method 'autoCompleteTextField(<em>:possibleCompletionsForString:)' in protocol 'MLPAutoCompleteTextFieldDataSource'</em></p>
  
  <p>Really appreciate it if you could explain not only how to fix this but point out some general rules or references on how to map various types (Array, callback etc) when implementing a Obj-C protocol in Swift.</p>