любой поможет мне с добавлением кнопки на кнопку «UPGRADE NOW»
func showPopup(){
// Create Alet View Controller
let alertController = CFAlertViewController(title: "Your Trial Plan Expires Soon",
message: "Thank you for using our services. Your Trial plan ends on Date",
textAlignment: .center,
preferredStyle: .actionSheet,
didDismissAlertHandler: nil)
// Create Upgrade Action
let defaultAction = CFAlertAction(title: "UPGRADE NOW",
style: .Default,
alignment: .center,
backgroundColor: UIColor(red: 0.8235, green: 0, blue: 0.9882, alpha: 1.0),
textColor: nil,
handler: { (action) in
print("Button with title '" + action.title! + "' tapped")
})
alertController.addAction(defaultAction)
present(alertController, animated: true, completion: nil)
}
Кнопка URL-адрес для broswer
objc func clickOnConpany() {
/*let vc = self.storyboard!.instantiateViewController(withIdentifier: "RegisterationViewController") as! RegisterationViewController
vc.isRegisterForCompany = true
self.navigationController?.pushViewController(vc, animated: true)*/
self.showAlert(with: "Alert!", andMessage: "In order to register as company visit website.", andSecondary: "Ok") {
DispatchQueue.main.async {
let sfSafriVC = SFSafariViewController.init(url: API.getOpenableLink(with: API.AppUrl.emploerLogin))
self.present(sfSafriVC, animated: true, completion: nil)
}
}
}
Пожалуйста, помогите мне добавить функцию кнопки в кнопку «UPGRADE NOW».