[iOS] fix crash when tap "About" in settings

This commit is contained in:
Aleksey Belousov 2020-01-27 18:20:10 +03:00 committed by Daria Volvenkova
parent 337f9d5543
commit cc7f404b9e

View file

@ -1,7 +1,14 @@
@objc
final class SettingsTableViewLinkCell: MWMTableViewCell {
@IBOutlet fileprivate weak var title: UILabel!
@IBOutlet fileprivate weak var info: UILabel!
@IBOutlet fileprivate weak var info: UILabel?
override func awakeFromNib() {
super.awakeFromNib()
self.styleName = "Background"
self.title.styleName = "regular17:blackPrimaryText"
self.info?.styleName = "regular17:blackSecondaryText"
}
@objc func config(title: String, info: String?) {
backgroundColor = UIColor.white()
@ -9,18 +16,7 @@ final class SettingsTableViewLinkCell: MWMTableViewCell {
self.title.text = title
styleTitle()
self.info.text = info
self.info.isHidden = info == nil
styleInfo()
}
fileprivate func styleTitle() {
title.textColor = UIColor.blackPrimaryText()
title.font = UIFont.regular17()
}
fileprivate func styleInfo() {
info.textColor = UIColor.blackSecondaryText()
info.font = UIFont.regular17()
self.info?.text = info
self.info?.isHidden = info == nil
}
}