问题 What is the correct syntax for this function in Swift? The following works fine, and colors the background purple: self.view.backgroundColor = UIColor.purpleColor() When I chain the colorWithAlphaComponent function, the view shows the correct alpha for a moment, and then changes to an opaque purple that is relatively dark: self.view.backgroundColor = UIColor.purpleColor().colorWithAlphaComponent(0.5) Is this the recommended function for adding an alpha value to a UIColor? Furthermore, why