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.
48 lines
1.3 KiB
48 lines
1.3 KiB
//
|
|
// AgentSearchTableViewCell.swift
|
|
// GMERemittance
|
|
//
|
|
// Created by FMI-12 on 2/6/18.
|
|
// Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
protocol AgentSearchTableViewCellDelegate : class {
|
|
func agentSearchTableViewCellDidTapMap(_ sender: AgentSearchTableViewCell)
|
|
}
|
|
|
|
class AgentSearchTableViewCell: UITableViewCell {
|
|
|
|
@IBOutlet weak var labelBranchName: UILabel!
|
|
@IBOutlet weak var labelBranchAddress: UILabel!
|
|
@IBOutlet weak var buttonPhoneNumber: UIButton!
|
|
@IBOutlet weak var buttonMap: UIButton!
|
|
|
|
weak var delegate: AgentSearchTableViewCellDelegate?
|
|
|
|
@IBAction func initiateCall(_ sender: UIButton) {
|
|
guard let number = URL(string: "tel://" + sender.title(for: .normal)!) else {
|
|
return
|
|
}
|
|
|
|
UIApplication.shared.openURL(number)
|
|
}
|
|
|
|
@IBAction func buttonMapTap(_ sender: UIButton) {
|
|
delegate?.agentSearchTableViewCellDidTapMap(self)
|
|
|
|
}
|
|
|
|
override func awakeFromNib() {
|
|
super.awakeFromNib()
|
|
// Initialization code
|
|
}
|
|
|
|
override func setSelected(_ selected: Bool, animated: Bool) {
|
|
super.setSelected(selected, animated: animated)
|
|
|
|
// Configure the view for the selected state
|
|
}
|
|
|
|
}
|