removed border llogic
This commit is contained in:
parent
1dfe49bde6
commit
4ae51e4c84
@ -84,13 +84,7 @@ open class TagsList: View {
|
||||
open func registerCells() {
|
||||
collectionView.register(TagCollectionViewCell.self, forCellWithReuseIdentifier: "TagCollectionViewCell")
|
||||
}
|
||||
|
||||
// MARK: - JSON Setters
|
||||
open func setHeight() {
|
||||
let height = collectionView.collectionViewLayout.collectionViewContentSize.height
|
||||
collectionViewHeight.constant = height
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension TagsList: UICollectionViewDataSource {
|
||||
|
||||
@ -13,12 +13,10 @@ import Foundation
|
||||
public var backgroundColor: Color?
|
||||
public static var identifier: String = "tagsList"
|
||||
public var tags: [TagModel]
|
||||
public var borderColor: Color?
|
||||
public var height: Float?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case borderColor
|
||||
case backgroundColor
|
||||
case tags
|
||||
case height
|
||||
@ -26,7 +24,6 @@ import Foundation
|
||||
|
||||
required public init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
borderColor = try typeContainer.decodeIfPresent(Color.self, forKey: .borderColor)
|
||||
tags = try typeContainer.decode([TagModel].self, forKey: .tags)
|
||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||
height = try typeContainer.decodeIfPresent(Float.self, forKey: .height)
|
||||
@ -36,7 +33,6 @@ import Foundation
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
try container.encode(tags, forKey: .tags)
|
||||
try container.encodeIfPresent(borderColor, forKey: .borderColor)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
try container.encode(height, forKey: .height)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user