mirror of
https://github.com/luxfi/safe-ios.git
synced 2026-10-30 15:19:20 +00:00
35 lines
706 B
Swift
35 lines
706 B
Swift
//
|
|
// Copyright © 2019 Gnosis Ltd. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class SeedWordCollectionViewCell: UICollectionViewCell {
|
|
|
|
@IBOutlet weak var numberLabel: UILabel!
|
|
@IBOutlet weak var wordLabel: UILabel!
|
|
|
|
override func awakeFromNib() {
|
|
super.awakeFromNib()
|
|
clipsToBounds = false
|
|
|
|
numberLabel.setStyle(.callout)
|
|
|
|
wordLabel.setStyle(.calloutPrimary)
|
|
wordLabel.adjustsFontSizeToFitWidth = true
|
|
wordLabel.minimumScaleFactor = 0.5
|
|
update()
|
|
}
|
|
|
|
var word: SeedWord? {
|
|
didSet {
|
|
update()
|
|
}
|
|
}
|
|
|
|
func update() {
|
|
wordLabel.text = word?.value
|
|
numberLabel.text = word?.number
|
|
}
|
|
}
|