removed border llogic

This commit is contained in:
Damodaram 2020-06-01 19:33:11 +05:30
parent 1dfe49bde6
commit 4ae51e4c84
2 changed files with 1 additions and 11 deletions

View File

@ -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 {

View File

@ -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)
}