forked from organicmaps/organicmaps
[iOS] fix crash when tap "About" in settings
This commit is contained in:
parent
337f9d5543
commit
cc7f404b9e
1 changed files with 10 additions and 14 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue