Manos Chorianopoulos

nonTelco popup in wallet

......@@ -58,6 +58,10 @@ import SwiftEventBus
tableView.dataSource = self
print("Active Gifts Count: " + String(coupons.count))
if ((profile != nil) && (profile?._nonTelco == true)) {
showDialog("", "Παρακαλούμε πολύ πρόσθεσε τις συνδέσεις σου στην COSMOTE για να έχεις πρόσβαση στα προνόμια του νέου Loyalty προγράμματος της COSMOTE!");
}
headerImage.image = UIImage(named: "ic_background_circle", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
dfyEarnImage.image = UIImage(named: "wallet_dfy_earn", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
......@@ -330,6 +334,27 @@ import SwiftEventBus
}
}
}
// MARK: - Functions
func showDialog(_ alertTitle: String, _ alertSubTitle: String) -> Void {
let alert = UIAlertController(title: alertTitle, message: alertSubTitle, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in
switch action.style{
case .default:
self.navigationController?.popViewController(animated: true)
self.dismiss(animated: true, completion: {})
case .cancel:
print("cancel")
case .destructive:
print("destructive")
}
}))
self.present(alert, animated: true, completion: nil)
}
// MARK: - Actions
@IBAction func qustionnaireButtonAction(_ sender: Any) {
......