Files

63 lines
1.3 KiB
Swift

//
// 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? {
get { titleLbl.lzText }
set {
titleLbl.lzText = newValue?.localized
}
}
var attributedText: NSAttributedString? {
didSet {
textLbl.attributedText = attributedText
}
}
var text: String? {
didSet {
textLbl.lzText = text
}
}
@IBInspectable public var lzText: String? {
get { textLbl.lzText }
set {
textLbl.lzText = newValue?.localized
// searchTextField.attributedPlaceholder = newValue?.localized
// .attributed(style: .medium, size: 14, color: Asset.textPebble.color)
}
}
@IBAction private func onCopy(_ : AnyObject?) {
Alert.copy(textLbl.lzText)
}
}