title: Unable to set the delegate to class in Swift
body: <p>This is their example function </p>
  
  <pre><code>[GTMagBarDevice sharedDevice].delegate = self;
  </code></pre>
  
  <p>I tried rewriting it in swift like this </p>
  
  <pre><code>GTMagBarDevice.sharedDevice().delegate = self; 
  </code></pre>
  
  <p>But I am receiving an error "type view controller does not conform to protocol GTMagBarDeviceDelegate"</p>
  
  <p>Any ideas?</p>
  
  <p><strong>Update</strong></p>
  
  <p>I have implemented all the required functions, this is what it says in the .h file i am bridging</p>
  
  <pre><code>@protocol GTMagBarDeviceDelegate &lt;NSObject&gt;
  @required
  - (void)magbarDevice:(GTMagBarDevice*)device accessoryConnected:(BOOL)state;
  - (void)magbarDevice:(GTMagBarDevice*)device componentFailed:(int)components;
  </code></pre>
  
  <p>And this is the implantation </p>
  
  <pre><code>func magbarDevice(magbarDevice: GTMagBarDevice, accessoryConnected isAccessoryConnected: Bool) {
  
  }
  
  func magbarDevice(magbarDevice: GTMagBarDevice, componentFailed components: Int) {
  
  }
  </code></pre>