title: Pass two arguments to NSTimer in Swift
body: <p>I have a function that contains strings of text in a TextView. I would like to change the fading of that text over time. It is not the implementation of how fading I'm in doubt about, but rather how to pass two arguments (the alpha value and the range of characters that should be faded) to the Selector in the NSTimer. </p>
  
  <p>I have looked at <a href="https://stackoverflow.com/questions/24889279/passing-parameters-to-a-method-called-by-nstimer-in-swift">this</a> question, but that does not provide me with an answer. </p>
  
  <p>This is what I have right now: </p>
  
  <pre><code>func someFunc(){
  
      var timer: NSTimer = NSTimer.scheduledTimerWithTimeInterval(0.1, target: self, selector: Selector("val:"), userInfo: 5, "someString", repeats: true)
  
  }
  
  
  func val(val1: Int, val2: String){
  
      println("printing \(val1) and \(val2)")
  
  }
  </code></pre>
  
  <p>However it gives me an "Extra argument 'selector' in call" error. I need to be able to pass two arguments, but I can't pass a single one correctly either; removing val2 from the function and removing "someString", so I only pass one argument, results in the function printing the line "printing 140611230609088" at every time step.</p>