SyntaxFix
Write A Post
Hire A Developer
Questions
in Swift 3.0
yourView.backgroundColor = UIColor.black.withAlphaComponent(0.5)
This works for me in xcode 8.2.
It may helps you.