為UIView加上陰影
backView.layer.shadowOffset = CGSize(width: 3, height: 3)
backView.layer.shadowOpacity = 0.7
backView.layer.shadowRadius = 2
backView.layer.shadowColor = UIColor(hexString: "#3A4355")!.CGColor
參考︰
Shadow effect in swift on UIView
http://gracefullycoded.com/shadow-effect-in-swift-on-uiview-uilabels/
Playing with UIView shadows in Swift
留言
張貼留言