title: Swift integer type cast to enum
body: <p>I have an <code>enum</code> declaration.</p>
  <pre><code>enum OP_CODE {
      case addition
      case substraction
      case multiplication
      case division
  }
  </code></pre>
  <p>And use it in a method:</p>
  <pre><code>func performOperation(operation: OP_CODE) {
          
  }
  </code></pre>
  <p>We all know that how we can call this normally</p>
  <pre><code>self.performOperation(OP_CODE.addition)
  </code></pre>
  <p>But if I have to call it in some delegate where the integer value is not predictable, how do I call it?</p>
  <p>For example:</p>
  <pre><code>func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
       self.delegate.performOperation(indexPath.row)
  }
  </code></pre>
  <p>Here, the compiler throws an error <code>Int is not convertible to 'OP_CODE'</code>. I've tried many permutations, but haven't been able to figure it out.</p>