mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-13 14:56:03 +10:00
fix show info in InfoView
This commit is contained in:
@@ -11,11 +11,7 @@ import Ruler
|
||||
|
||||
class InfoView: UIView {
|
||||
|
||||
var info: String? {
|
||||
willSet {
|
||||
infoLabel?.text = newValue
|
||||
}
|
||||
}
|
||||
var info: String?
|
||||
|
||||
private var infoLabel: UILabel?
|
||||
|
||||
@@ -37,8 +33,6 @@ class InfoView: UIView {
|
||||
|
||||
func makeUI() {
|
||||
|
||||
//let view = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.mainScreen().bounds.width, height: 240))
|
||||
|
||||
let label = UILabel()
|
||||
|
||||
label.numberOfLines = 0
|
||||
@@ -61,4 +55,11 @@ class InfoView: UIView {
|
||||
NSLayoutConstraint.activateConstraints(constraintsH)
|
||||
NSLayoutConstraint.activateConstraints(constraintsV)
|
||||
}
|
||||
|
||||
override func didMoveToSuperview() {
|
||||
super.didMoveToSuperview()
|
||||
|
||||
infoLabel?.text = info
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user