Showing
1 changed file
with
13 additions
and
8 deletions
| ... | @@ -3003,23 +3003,27 @@ public class swiftApi { | ... | @@ -3003,23 +3003,27 @@ public class swiftApi { |
| 3003 | func initialSharingDialog(_ controller: UIViewController, _ alertTitle: String, _ sharingId: String) -> Void { | 3003 | func initialSharingDialog(_ controller: UIViewController, _ alertTitle: String, _ sharingId: String) -> Void { |
| 3004 | 3004 | ||
| 3005 | let alert = UIAlertController(title: "Συγχαρητήρια!", message: alertTitle, preferredStyle: .alert) | 3005 | let alert = UIAlertController(title: "Συγχαρητήρια!", message: alertTitle, preferredStyle: .alert) |
| 3006 | - alert.addAction(UIAlertAction(title: "Ενεργοποίηση", style: .default, handler: { action in | 3006 | + |
| 3007 | + let cancelButton = UIAlertAction(title: "Απόρριψη", style: .default, handler: { action in | ||
| 3007 | switch action.style{ | 3008 | switch action.style{ |
| 3008 | case .default: | 3009 | case .default: |
| 3009 | - self.cosmoteRetrieveSharingAsync(sharingId: sharingId, accept: true, retrieveSharingCallback) | 3010 | + self.rejectSharingDialog(controller, sharingId) |
| 3010 | - | 3011 | + |
| 3011 | case .cancel: | 3012 | case .cancel: |
| 3012 | print("cancel") | 3013 | print("cancel") |
| 3013 | - | 3014 | + |
| 3014 | case .destructive: | 3015 | case .destructive: |
| 3015 | print("destructive") | 3016 | print("destructive") |
| 3016 | - | 3017 | + |
| 3017 | } | 3018 | } |
| 3018 | - })) | 3019 | + }) |
| 3019 | - alert.addAction(UIAlertAction(title: "Απόρριψη", style: .default, handler: { action in | 3020 | + cancelButton.setValue(UIColor(rgb: 0xFC5757), forKey: "titleTextColor") |
| 3021 | + alert.addAction(cancelButton) | ||
| 3022 | + | ||
| 3023 | + alert.addAction(UIAlertAction(title: "Ενεργοποίηση", style: .default, handler: { action in | ||
| 3020 | switch action.style{ | 3024 | switch action.style{ |
| 3021 | case .default: | 3025 | case .default: |
| 3022 | - self.rejectSharingDialog(controller, sharingId) | 3026 | + self.cosmoteRetrieveSharingAsync(sharingId: sharingId, accept: true, retrieveSharingCallback) |
| 3023 | 3027 | ||
| 3024 | case .cancel: | 3028 | case .cancel: |
| 3025 | print("cancel") | 3029 | print("cancel") |
| ... | @@ -3029,6 +3033,7 @@ public class swiftApi { | ... | @@ -3029,6 +3033,7 @@ public class swiftApi { |
| 3029 | 3033 | ||
| 3030 | } | 3034 | } |
| 3031 | })) | 3035 | })) |
| 3036 | + | ||
| 3032 | controller.present(alert, animated: true, completion: nil) | 3037 | controller.present(alert, animated: true, completion: nil) |
| 3033 | 3038 | ||
| 3034 | 3039 | ... | ... |
-
Please register or login to post a comment