39 lines
852 B
Swift
39 lines
852 B
Swift
//
|
|
// CardView.swift
|
|
// Wallet
|
|
//
|
|
// Created by Saveliy Stavitsky on 9/15/21.
|
|
// Copyright © 2021 AM. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class CardView: CommonViewCustom {
|
|
|
|
@IBOutlet weak var mainView: UIView!
|
|
@IBOutlet weak var imageView: UIImageView!
|
|
@IBOutlet weak var titleLabel: UILabel!
|
|
@IBOutlet weak var descriptionLabel: UILabel!
|
|
@IBOutlet weak var rightImageView: UIImageView!
|
|
|
|
var action: (() -> Void)?
|
|
|
|
override func setup() {
|
|
super.setup()
|
|
|
|
mainView.layer.cornerRadius = 8.0
|
|
mainView.layer.borderWidth = 1
|
|
mainView.layer.borderColor = Asset.marble.color.cgColor
|
|
}
|
|
|
|
@IBAction func onAction(_: AnyObject?) {
|
|
action?()
|
|
}
|
|
|
|
func makeShadowStyle() {
|
|
mainView.layer.borderWidth = 0
|
|
mainView.makeShadow()
|
|
layoutIfNeeded()
|
|
}
|
|
}
|