title: Swift - How to mutate a struct object when iterating over it
body: <p>I am still not sure about the rules of struct copy or reference.</p>
  
  <p>I want to mutate a struct object while iterating on it from an array:
  For instance in this case I would like to change the background color
  but the compiler is yelling at me</p>
  
  <pre><code>struct Options {
    var backgroundColor = UIColor.blackColor()
  }
  
  var arrayOfMyStruct = [MyStruct]
  
  ...
  
  for obj in arrayOfMyStruct {
    obj.backgroundColor = UIColor.redColor() // ! get an error
  }
  </code></pre>