Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 37 additions & 1 deletion LithoUtils/Classes/Base/Models/CodableButtonStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,43 @@ open class CodableButtonStyle: CodableViewStyleProtocol, Codable {
open var titleShadowColor: String?
open var font: CodableFont?

public init() {}
public init(
backgroundColorHex: String? = nil,
tintColorHex: String? = nil,
isHidden: Bool? = nil,
isOpaque: Bool? = nil,
clipsToBounds: Bool? = nil,
alpha: CGFloat? = nil,
cornerRadius: CGFloat? = nil,
maskedCorners: CACornerMask? = nil,
isRounded: Bool? = nil,
borderWidth: CGFloat? = nil,
borderColorHex: String? = nil,
shadowColorHex: String? = nil,
shadowRadius: CGFloat? = nil,
shadowOpacity: Float? = nil,
font: CodableFont? = nil,
titleColor: String? = nil,
titleShadowColor: String? = nil
) {
self.backgroundColorHex = backgroundColorHex
self.tintColorHex = tintColorHex
self.isHidden = isHidden
self.isOpaque = isOpaque
self.clipsToBounds = clipsToBounds
self.alpha = alpha
self.cornerRadius = cornerRadius
self.maskedCorners = maskedCorners
self.isRounded = isRounded
self.borderWidth = borderWidth
self.borderColorHex = borderColorHex
self.shadowColorHex = shadowColorHex
self.shadowRadius = shadowRadius
self.shadowOpacity = shadowOpacity
self.font = font
self.titleColor = titleColor
self.titleShadowColor = titleShadowColor
}

public func apply(to view: UIView?) {
view |> ~>styleButtonFunction(given: self)
Expand Down
42 changes: 40 additions & 2 deletions LithoUtils/Classes/Base/Models/CodableLabelStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,51 @@ open class CodableLabelStyle: CodableViewStyleProtocol, Codable {
public var shadowColorHex: String?
public var shadowRadius: CGFloat?
public var shadowOpacity: Float?
public var lineHeightMultiplier: CGFloat?

public var font: CodableFont?
public var textColor: String?
public var labelShadowColor: String?
public var lineHeightMultiplier: CGFloat?

public init() {}
public init(
backgroundColorHex: String? = nil,
tintColorHex: String? = nil,
isHidden: Bool? = nil,
isOpaque: Bool? = nil,
clipsToBounds: Bool? = nil,
alpha: CGFloat? = nil,
cornerRadius: CGFloat? = nil,
maskedCorners: CACornerMask? = nil,
isRounded: Bool? = nil,
borderWidth: CGFloat? = nil,
borderColorHex: String? = nil,
shadowColorHex: String? = nil,
shadowRadius: CGFloat? = nil,
shadowOpacity: Float? = nil,
font: CodableFont? = nil,
textColor: String? = nil,
lineHeightMultiplier: CGFloat? = nil,
labelShadowColor: String? = nil
) {
self.backgroundColorHex = backgroundColorHex
self.tintColorHex = tintColorHex
self.isHidden = isHidden
self.isOpaque = isOpaque
self.clipsToBounds = clipsToBounds
self.alpha = alpha
self.cornerRadius = cornerRadius
self.maskedCorners = maskedCorners
self.isRounded = isRounded
self.borderWidth = borderWidth
self.borderColorHex = borderColorHex
self.shadowColorHex = shadowColorHex
self.shadowRadius = shadowRadius
self.shadowOpacity = shadowOpacity
self.font = font
self.textColor = textColor
self.labelShadowColor = labelShadowColor
self.lineHeightMultiplier = lineHeightMultiplier
}

public func apply(to view: UIView?) {
view |> ~>styleLabelFunction(given: self)
Expand Down
38 changes: 37 additions & 1 deletion LithoUtils/Classes/Base/Models/CodableTextFieldStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,43 @@ open class CodableTextFieldStyle: CodableViewStyleProtocol, Codable {
public var textColor: String?
public var borderStyle: UITextField.BorderStyle?

public init() {}
public init(
backgroundColorHex: String? = nil,
tintColorHex: String? = nil,
isHidden: Bool? = nil,
isOpaque: Bool? = nil,
clipsToBounds: Bool? = nil,
alpha: CGFloat? = nil,
cornerRadius: CGFloat? = nil,
maskedCorners: CACornerMask? = nil,
isRounded: Bool? = nil,
borderWidth: CGFloat? = nil,
borderColorHex: String? = nil,
shadowColorHex: String? = nil,
shadowRadius: CGFloat? = nil,
shadowOpacity: Float? = nil,
font: CodableFont? = nil,
textColor: String? = nil,
borderStyle: UITextField.BorderStyle? = nil
) {
self.backgroundColorHex = backgroundColorHex
self.tintColorHex = tintColorHex
self.isHidden = isHidden
self.isOpaque = isOpaque
self.clipsToBounds = clipsToBounds
self.alpha = alpha
self.cornerRadius = cornerRadius
self.maskedCorners = maskedCorners
self.isRounded = isRounded
self.borderWidth = borderWidth
self.borderColorHex = borderColorHex
self.shadowColorHex = shadowColorHex
self.shadowRadius = shadowRadius
self.shadowOpacity = shadowOpacity
self.font = font
self.textColor = textColor
self.borderStyle = borderStyle
}

public func apply(to view: UIView?) {
view |> ~>styleTextFieldFunction(given: self)
Expand Down
40 changes: 39 additions & 1 deletion LithoUtils/Classes/Base/Models/CodableTextViewStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,45 @@ open class CodableTextViewStyle: CodableViewStyleProtocol, Codable {
public var lineHeightMultiplier: CGFloat?
public var lineFragmentPadding: CGFloat?

public init() {}
public init(
backgroundColorHex: String? = nil,
tintColorHex: String? = nil,
isHidden: Bool? = nil,
isOpaque: Bool? = nil,
clipsToBounds: Bool? = nil,
alpha: CGFloat? = nil,
cornerRadius: CGFloat? = nil,
maskedCorners: CACornerMask? = nil,
isRounded: Bool? = nil,
borderWidth: CGFloat? = nil,
borderColorHex: String? = nil,
shadowColorHex: String? = nil,
shadowRadius: CGFloat? = nil,
shadowOpacity: Float? = nil,
font: CodableFont? = nil,
textColor: String? = nil,
lineHeightMultiplier: CGFloat? = nil,
lineFragmentPadding: CGFloat? = nil
) {
self.backgroundColorHex = backgroundColorHex
self.tintColorHex = tintColorHex
self.isHidden = isHidden
self.isOpaque = isOpaque
self.clipsToBounds = clipsToBounds
self.alpha = alpha
self.cornerRadius = cornerRadius
self.maskedCorners = maskedCorners
self.isRounded = isRounded
self.borderWidth = borderWidth
self.borderColorHex = borderColorHex
self.shadowColorHex = shadowColorHex
self.shadowRadius = shadowRadius
self.shadowOpacity = shadowOpacity
self.font = font
self.textColor = textColor
self.lineHeightMultiplier = lineHeightMultiplier
self.lineFragmentPadding = lineFragmentPadding
}

public func apply(to view: UIView?) {
view |> ~>styleTextViewFunction(given: self)
Expand Down
32 changes: 31 additions & 1 deletion LithoUtils/Classes/Base/Models/CodableViewStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,37 @@ open class CodableViewStyle: CodableViewStyleProtocol, Codable {
open var shadowRadius: CGFloat?
open var shadowOpacity: Float?

public init() {}
public init(
backgroundColorHex: String? = nil,
tintColorHex: String? = nil,
isHidden: Bool? = nil,
isOpaque: Bool? = nil,
clipsToBounds: Bool? = nil,
alpha: CGFloat? = nil,
cornerRadius: CGFloat? = nil,
maskedCorners: CACornerMask? = nil,
isRounded: Bool? = nil,
borderWidth: CGFloat? = nil,
borderColorHex: String? = nil,
shadowColorHex: String? = nil,
shadowRadius: CGFloat? = nil,
shadowOpacity: Float? = nil
) {
self.backgroundColorHex = backgroundColorHex
self.tintColorHex = tintColorHex
self.isHidden = isHidden
self.isOpaque = isOpaque
self.clipsToBounds = clipsToBounds
self.alpha = alpha
self.cornerRadius = cornerRadius
self.maskedCorners = maskedCorners
self.isRounded = isRounded
self.borderWidth = borderWidth
self.borderColorHex = borderColorHex
self.shadowColorHex = shadowColorHex
self.shadowRadius = shadowRadius
self.shadowOpacity = shadowOpacity
}

public func apply(to view: UIView?) {
view |> styleFunction(given: self)
Expand Down