// // CommonViewCopy.swift // List // // Created by Igor Danich on 27.07.2020. // Copyright © 2020 List. All rights reserved. // import UIKit @IBDesignable class CommonViewCopy: CommonViewCustom { @IBOutlet private weak var titleLbl: UILabel! @IBOutlet private weak var textLbl: UILabel! @IBOutlet private weak var button: UIButton! var image: UIImage? { didSet { button.setImage(image, for: .normal) } } var title: String? { didSet { titleLbl.lzText = title } } @IBInspectable public var lzTitle: String? { set { titleLbl.lzText = newValue?.localized // searchTextField.attributedPlaceholder = newValue?.localized // .attributed(style: .medium, size: 14, color: Asset.textPebble.color) } get { titleLbl.lzText } } var attributedText: NSAttributedString? { didSet { textLbl.attributedText = attributedText } } var text: String? { didSet { textLbl.lzText = text } } @IBInspectable public var lzText: String? { set { textLbl.lzText = newValue?.localized // searchTextField.attributedPlaceholder = newValue?.localized // .attributed(style: .medium, size: 14, color: Asset.textPebble.color) } get { textLbl.lzText } } // override func awakeFromNib() { // super.awakeFromNib() //// layer.cornerRadius = frameHeight/2 //// clipsToBounds = true //// contentView.backgroundColor = UIColor(red: 0.969, green: 0.976, blue: 0.996, alpha: 1) // } // // override func prepareForInterfaceBuilder() { // super.prepareForInterfaceBuilder() //// layer.cornerRadius = frameHeight/2 //// contentView.backgroundColor = UIColor(red: 0.969, green: 0.976, blue: 0.996, alpha: 1) // } @IBAction private func onCopy(_ : AnyObject?) { Alert.copy(textLbl.lzText) } }