2 // BecomeFriendTableViewCell.swift
5 // Created by Pawel Dabrowski on 31/08/2018.
6 // Copyright © 2018 Fundacja Nowoczesna Polska. All rights reserved.
11 protocol BecomeFriendTableViewCellDelegate: class{
12 func becomeFriendTableViewCellTapped()
15 class BecomeFriendTableViewCell: WLTableViewCell {
17 @IBOutlet weak var arrowImageView: UIImageView!
18 @IBOutlet weak var button: UIButton!
19 weak var delegate: BecomeFriendTableViewCellDelegate?
21 class func instance(delegate: BecomeFriendTableViewCellDelegate?) -> BecomeFriendTableViewCell{
22 let cell = BecomeFriendTableViewCell.instance(type: BecomeFriendTableViewCell.self)
23 cell.delegate = delegate
27 override func awakeFromNib() {
29 button.layer.cornerRadius = 15
30 button.text = "support_us".localized.uppercased()
31 arrowImageView.tintColor = UIColor.white
32 contentView.backgroundColor = UIColor.white
35 override func getHeight() -> CGFloat {
37 return Constants.donateEnabled ? 40 : 44
40 @IBAction func buttonAction(_ sender: Any) {
41 delegate?.becomeFriendTableViewCellTapped()