forked from shadowfacts/Tusker
Fix crash when displaying new status cells with polls
This commit is contained in:
parent
5b116c0d4e
commit
0fee770411
|
@ -38,9 +38,17 @@ class StatusPollView: UIView {
|
|||
optionsView.isTracking
|
||||
}
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: .zero)
|
||||
commonInit()
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
super.init(coder: coder)
|
||||
commonInit()
|
||||
}
|
||||
|
||||
private func commonInit() {
|
||||
backgroundColor = .clear
|
||||
|
||||
optionsView = PollOptionsView(frame: .zero)
|
||||
|
@ -55,12 +63,6 @@ class StatusPollView: UIView {
|
|||
infoLabel.adjustsFontSizeToFitWidth = true
|
||||
addSubview(infoLabel)
|
||||
|
||||
// voteButton = UIButton(type: .system)
|
||||
// voteButton.translatesAutoresizingMaskIntoConstraints = false
|
||||
// voteButton.addTarget(self, action: #selector(votePressed), for: .touchUpInside)
|
||||
// voteButton.setTitle("Vote", for: .normal)
|
||||
// voteButton.setTitleColor(.secondaryLabel, for: .disabled)
|
||||
// voteButton.titleLabel!.font = infoLabel.font
|
||||
voteButton = PollVoteButton()
|
||||
voteButton.translatesAutoresizingMaskIntoConstraints = false
|
||||
voteButton.addTarget(self, action: #selector(votePressed))
|
||||
|
|
Loading…
Reference in New Issue