//Here you can make method of calling functionality. func callNumber (yourP honeNumber : String ) { if let phoneCallURL = URL ( string : "tel://\(yourP honeNumber )" ) { let application : UIApplication = UIApplication . shared if ( application . canOpenURL ( phoneCallURL )) { application . open ( phoneCallURL , options : [:], completionHandler : nil ) } } } Happy Coding :)
// Here is the Gradient method, You can edit your color as per requirements. func BtnClrmethod(btn: UIButton ) { let gradientLayer: CAGradientLayer ! btn. layer . cornerRadius = 5 let greenClr = UIColor (red: CGFloat ( 38.0 / 255 ), green: CGFloat ( 122.0 / 255 ), blue: CGFloat ( 81.0 / 255 ), alpha: 1.0 ) let blueClr = UIColor (red: CGFloat ( 36.0 / 255 ), green: CGFloat ( 96.0 / 255 ), blue: CGFloat ( 159.0 / 255 ), alpha: 1.0 ) gradientLayer = CAGradientLayer () gradientLayer . frame = btn. bounds gradientLayer . cornerRadius = 5 gradientLayer . colors = [greenClr. cgColor , blueClr. cgColor ] btn. layer . addSublayer ( gradientLayer ) } ...