How to assign one class type instance to another class type reference in swift to apply dynamic polymorphism
<p>iam unable to set backgroundcolor for label at runtime</p>

<pre><code>func example() {
  let lbl: UILabel = UILabel()
  let arrTemp: NSMutableArray = NSMutableArray()
  arrTemp.addObject(lbl)
  let tempButton: UIButton? = arrTemp.objectAtIndex(0) as? UIButton
  tempButton.backgroundColor = UIColor.whiteColor()
}
</code></pre>