mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-27 01:52: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
@ -90,13 +90,23 @@ class SidebarCell : NSTableCellView {
|
||||
override var isFlipped: Bool {
|
||||
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