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

@ -85,12 +85,6 @@ open class TagsList: View {
collectionView.register(TagCollectionViewCell.self, forCellWithReuseIdentifier: "TagCollectionViewCell") collectionView.register(TagCollectionViewCell.self, forCellWithReuseIdentifier: "TagCollectionViewCell")
} }
// MARK: - JSON Setters
open func setHeight() {
let height = collectionView.collectionViewLayout.collectionViewContentSize.height
collectionViewHeight.constant = height
}
} }
extension TagsList: UICollectionViewDataSource { extension TagsList: UICollectionViewDataSource {

View File

@ -13,12 +13,10 @@ import Foundation
public var backgroundColor: Color? public var backgroundColor: Color?
public static var identifier: String = "tagsList" public static var identifier: String = "tagsList"
public var tags: [TagModel] public var tags: [TagModel]
public var borderColor: Color?
public var height: Float? public var height: Float?
private enum CodingKeys: String, CodingKey { private enum CodingKeys: String, CodingKey {
case moleculeName case moleculeName
case borderColor
case backgroundColor case backgroundColor
case tags case tags
case height case height
@ -26,7 +24,6 @@ import Foundation
required public init(from decoder: Decoder) throws { required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
borderColor = try typeContainer.decodeIfPresent(Color.self, forKey: .borderColor)
tags = try typeContainer.decode([TagModel].self, forKey: .tags) tags = try typeContainer.decode([TagModel].self, forKey: .tags)
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
height = try typeContainer.decodeIfPresent(Float.self, forKey: .height) height = try typeContainer.decodeIfPresent(Float.self, forKey: .height)
@ -36,7 +33,6 @@ import Foundation
var container = encoder.container(keyedBy: CodingKeys.self) var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(moleculeName, forKey: .moleculeName) try container.encode(moleculeName, forKey: .moleculeName)
try container.encode(tags, forKey: .tags) try container.encode(tags, forKey: .tags)
try container.encodeIfPresent(borderColor, forKey: .borderColor)
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor) try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
try container.encode(height, forKey: .height) try container.encode(height, forKey: .height)
} }