Вы можете установить градиент следующим образом:
func setTealGradientBackground() {
let colorTeal = UIColor(red: 0/255.0, green: 128.0/255.0, blue: 128.0/255.0, alpha: 1.0).CGColor
let colorWhite = UIColor(red: 255.0/255.0, green: 255.0/255.0, blue: 255.0/255.0, alpha: 1.0).CGColor
let gradLayer = CAGradientLayer()
gradLayer.colors = [colorTeal, colorWhite]
gradLayer.locations = [0.0, 1.0]
gradLayer.frame = self.view.bounds
self.view.layer.insertSublayer(gradLayer, at:0)
}