title: Swift passing element as variable
body: <p>In javascript I know i can something like the following:</p>
  
  <pre><code>var foo = '';
  
  function changeVariable(variable, data){
    this[variable] = data;
  }
  
  changeVariable("foo", "bar");
  </code></pre>
  
  <p>Is there away I can do this in swift?</p>
  
  <pre><code>func toggleFadeIn (element: String, active: Bool)
  {
      if(!active){
          self.element.alpha = 0;
          self.element.transform = CGAffineTransform(translationX: 0, y: 25)
      }
  
  }
  </code></pre>