Posts

Post marked as solved
9 Replies
I have been able to run on ios 12 device there is a custom label but when I run my app on devices on ios 12 it crash with this error NSUnknownKeyException', reason: '[<EFontRegular 0x10999e050> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key boldColor but works fine for ios 13 and above final class EFontRegular: BaseUILabel { override var fontType: UIFont? { return UIFont(name: EFontConstant.Name.regular.rawValue, size: fontSize) } } class BaseUILabel: UILabel { let lineSpacing: CGFloat = 8 @IBInspectable var fontSize: CGFloat { return self.font.pointSize } @IBInspectable var fontType: UIFont? { return UIFont(name: EFontConstant.Name.regular.rawValue, size: EFontConstant.Size.regular.rawValue) } @IBInspectable var underline: Bool = false { didSet { if underline { self.underline() } } } @IBInspectable var alignCenter: Bool = false { didSet { if alignCenter { attributedText = text?.lineSpaced(lineSpacing, .center) } } } @IBInspectable var stringToColor: String = "" { didSet { let alignment: NSTextAlignment = alignCenter ? .center : .left attributedText = text?.lineSpacedWithInlineColor(lineSpacing, alignment, stringToColor: stringToColor) } } @IBInspectable var boldColor: UIColor { // R.color.primaryLabelColor() ?? UIColor() traitCollection.userInterfaceStyle == .light ? .black : .white } @IBInspectable var stringToBold: String = "" { didSet { let alignment: NSTextAlignment = alignCenter ? .center : .left attributedText = text?.lineSpacedWithInlineColor(lineSpacing, alignment, stringToColor: stringToBold, color: boldColor, bold: true, boldTextSize: fontSize) } } @IBInspectable var characterSpacing: Double = 0 { didSet { self.addCharacterSpacing(kernValue: characterSpacing) } } override init(frame: CGRect) { super.init(frame: frame) commonInit() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) commonInit() } override func prepareForInterfaceBuilder() { super.prepareForInterfaceBuilder() commonInit() } func commonInit() { guard let customFont = fontType else { fatalError(""" Failed to load the "\(String(describing: fontType?.fontName))" font. Make sure the font file is included in the project and the font name is spelled correctly. """ ) } font = UIFontMetrics.default.scaledFont(for: customFont) adjustsFontForContentSizeCategory = true attributedText = text?.lineSpaced(lineSpacing) } }
Post marked as solved
9 Replies
Thank you, Discontinuing support for iOS 12 is an option we are pursuing, We wanted to reach out to see if we can salvage the situation and I've seen a couple of posts about iOS 12 bug in the past thought this could be one of them, but thank you again.
Post marked as solved
9 Replies
An image from organiser @eskimo
Post marked as solved
9 Replies
2021-10-11_18-54-32.3561_+0100-38f25c8ae58b9e8e94ae6381897e2bf44c0fdc39.crash
Post not yet marked as solved
16 Replies
1 year 2 months later and it's still there
Post not yet marked as solved
12 Replies
I am getting this error while fetching data from firebase