Manos Chorianopoulos

Added ShareVC popup back action

......@@ -185,6 +185,26 @@ import SwiftEventBus
self.present(alert, animated: true, completion: nil)
}
func showDialogWithBack(_ 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)
}
func showSuccessDialog(_ alertTitle: String, _ alertSubTitle: String) -> Void {
let alert = UIAlertController(title: alertTitle, message: alertSubTitle, preferredStyle: .alert)
......@@ -273,7 +293,7 @@ import SwiftEventBus
extension ShareViewController: NumbersPopupDelegate {
@objc func numbersPopupTapped(_ sender: Any) {
if (self.numbersList.count == 0) {
self.showDialog("Κάνε δώρο","Για την αποστολή του δώρου σου χρειάζεται να έχεις κινητό COSMOTE.")
self.showDialogWithBack("Κάνε δώρο","Για την αποστολή του δώρου σου χρειάζεται να έχεις κινητό COSMOTE.")
} else {
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
// self.storyboard?
......