blockchainethereumblockchain-walleterc20erc721walletxdaidappdecentralizederc1155erc875iosswifttokens
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.
45 lines
1.1 KiB
45 lines
1.1 KiB
// Copyright SIX DAY LLC. All rights reserved.
|
|
|
|
import UIKit
|
|
|
|
class BalanceTitleView: UIView {
|
|
|
|
/// UIAppearance compatible property
|
|
dynamic var titleColor: UIColor {
|
|
get { return self.label.textColor! }
|
|
set { self.label.textColor = newValue }
|
|
}
|
|
|
|
dynamic var titleFont: UIFont {
|
|
get { return self.label.font! }
|
|
set { self.label.font = newValue }
|
|
}
|
|
|
|
let label: UILabel = UILabel()
|
|
|
|
var title: String = "" {
|
|
didSet {
|
|
label.text = title
|
|
label.sizeToFit()
|
|
}
|
|
}
|
|
|
|
override init(frame: CGRect) {
|
|
super.init(frame: .zero)
|
|
|
|
label.translatesAutoresizingMaskIntoConstraints = false
|
|
|
|
addSubview(label)
|
|
|
|
NSLayoutConstraint.activate([
|
|
label.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
label.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
label.topAnchor.constraint(equalTo: topAnchor),
|
|
label.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
])
|
|
}
|
|
|
|
required init?(coder aDecoder: NSCoder) {
|
|
fatalError("init(coder:) has not been implemented")
|
|
}
|
|
}
|
|
|