An advanced Ethereum/EVM mobile wallet
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.
alpha-wallet-ios/Trust/UI/BalanceTitleView.swift

41 lines
1.0 KiB

7 years ago
// Copyright SIX DAY LLC, Inc. All rights reserved.
import UIKit
class BalanceTitleView: UIView {
/// UIAppearance compatible property
dynamic var titleTextColor: UIColor {
get { return self.label.backgroundColor! }
set { self.label.textColor = newValue }
}
7 years ago
let label: UILabel = UILabel()
7 years ago
var title: String = "" {
didSet {
label.text = title
label.sizeToFit()
}
}
7 years ago
override init(frame: CGRect) {
super.init(frame: .zero)
label.translatesAutoresizingMaskIntoConstraints = false
7 years ago
addSubview(label)
7 years ago
NSLayoutConstraint.activate([
label.trailingAnchor.constraint(equalTo: trailingAnchor),
label.leadingAnchor.constraint(equalTo: leadingAnchor),
label.topAnchor.constraint(equalTo: topAnchor),
label.bottomAnchor.constraint(equalTo: bottomAnchor),
])
}
7 years ago
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}