You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.2 KiB

5 years ago
5 years ago
  1. //
  2. // PopupNotificationViewController.swift
  3. // GME Remit
  4. //
  5. // Created by InKwon James Kim on 12/07/2019.
  6. //Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import UIKit
  9. class PopupNotificationViewController: UIViewController {
  10. // MARK: Properties
  11. var presenter: PopupNotificationModuleInterface?
  12. // MARK: Computed Properties
  13. // MARK: IBOutlets
  14. @IBOutlet weak var mainView: UIView!
  15. // MARK: VC's Life cycle
  16. override func viewDidLoad() {
  17. super.viewDidLoad()
  18. setup()
  19. }
  20. // MARK: IBActions
  21. @IBAction func touchDontShowAgainTodayButton(_ sender: UIButton) {
  22. let now = Date()
  23. GMEDB
  24. .shared
  25. .app
  26. .set(true, .isOpenedPopupNotification)
  27. .set(now, .dateOfDontShowNotification)
  28. dismiss(animated: true, completion: nil)
  29. }
  30. @IBAction func touchOkButton(_ sender: UIButton) {
  31. GMEDB.shared.app.set(true, .isOpenedPopupNotification)
  32. dismiss(animated: true, completion: nil)
  33. }
  34. }
  35. // MARK: PopupNotificationViewInterface
  36. extension PopupNotificationViewController: PopupNotificationViewInterface {
  37. }
  38. // MARK: Other Functions
  39. extension PopupNotificationViewController {
  40. private func setup() {
  41. // all setup should be done here
  42. }
  43. }