mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-27 18:12:30 +01:00
Override textField and imageView didSet — their properties weren’t getting set in commonInit, because they weren’t set yet.
This commit is contained in:
parent
ceb061f616
commit
8545d3422f
@ -91,12 +91,22 @@ class SidebarCell : NSTableCellView {
|
||||
return true
|
||||
}
|
||||
|
||||
override var textField: NSTextField? {
|
||||
didSet {
|
||||
textField?.translatesAutoresizingMaskIntoConstraints = false
|
||||
updateTextFieldIsEditable()
|
||||
}
|
||||
}
|
||||
|
||||
override var imageView: NSImageView? {
|
||||
didSet {
|
||||
imageView?.translatesAutoresizingMaskIntoConstraints = false
|
||||
}
|
||||
}
|
||||
|
||||
private func commonInit() {
|
||||
unreadCountView.translatesAutoresizingMaskIntoConstraints = false
|
||||
imageView?.translatesAutoresizingMaskIntoConstraints = false
|
||||
textField?.translatesAutoresizingMaskIntoConstraints = false
|
||||
addSubview(unreadCountView)
|
||||
updateTextFieldIsEditable()
|
||||
}
|
||||
|
||||
override init(frame frameRect: NSRect) {
|
||||
|
Loading…
Reference in New Issue
Block a user