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.

52 lines
1.3 KiB

6 years ago
  1. //
  2. // MoneyRequestTableViewCell.swift
  3. // GMERemittance
  4. //
  5. // Created by Sujal on 3/5/18.
  6. // Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import UIKit
  9. protocol MoneyRequestDelegate: class {
  10. func readMessage(_ sender: MoneyRequestTableViewCell)
  11. func acceptRequest(_ sender: MoneyRequestTableViewCell)
  12. func declineRequest(_ sender: MoneyRequestTableViewCell)
  13. }
  14. class MoneyRequestTableViewCell: UITableViewCell {
  15. @IBOutlet weak var labelInitial: UILabel!
  16. @IBOutlet weak var labelName: UILabel!
  17. @IBOutlet weak var labelGMEID: UILabel!
  18. @IBOutlet weak var labelAmount: UILabel!
  19. @IBOutlet weak var labelDateTime: UILabel!
  20. weak var delegate: MoneyRequestDelegate?
  21. override func awakeFromNib() {
  22. super.awakeFromNib()
  23. // Initialization code
  24. }
  25. override func setSelected(_ selected: Bool, animated: Bool) {
  26. super.setSelected(selected, animated: animated)
  27. // Configure the view for the selected state
  28. }
  29. @IBAction func readMessage(_ sender: Any) {
  30. delegate?.readMessage(self)
  31. }
  32. @IBAction func declineRequest(_ sender: Any) {
  33. delegate?.declineRequest(self)
  34. }
  35. @IBAction func acceptRequest(_ sender: Any) {
  36. delegate?.acceptRequest(self)
  37. }
  38. }