Comments update

This commit is contained in:
Pfeil, Scott Robert 2020-02-13 10:55:46 -05:00
parent adaa9ca1f3
commit c6e9c84809
2 changed files with 5 additions and 3 deletions

View File

@ -60,8 +60,7 @@ import UIKit
open func setNavigationItem() {
navigationItem.title = pageModel?.screenHeading
navigationItem.accessibilityLabel = pageModel?.screenHeading
navigationItem.accessibilityLabel = pageModel?.screenHeading
}
open func newDataBuildScreen() {

View File

@ -29,7 +29,10 @@ class AccordionListItemModel: MoleculeListItemModel {
required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
molecules = try typeContainer.decodeMolecules(codingKey: .molecules) as! [ListItemModelProtocol & MoleculeModelProtocol]
guard let molecules = try typeContainer.decodeMolecules(codingKey: .molecules) as? [ListItemModelProtocol & MoleculeModelProtocol] else {
throw DecodingError.typeMismatch([ListItemModelProtocol & MoleculeModelProtocol].self, DecodingError.Context(codingPath: decoder.codingPath, debugDescription: "Casting failed"))
}
self.molecules = molecules
if let hideLine = try typeContainer.decodeIfPresent(Bool.self, forKey: .hideLineWhenExpanded) {
hideLineWhenExpanded = hideLine
}