Camera improvements

This commit is contained in:
Ilya Laktyushin
2023-04-25 18:38:09 +04:00
parent 385c65d908
commit da421229fd
52 changed files with 4219 additions and 455 deletions

View File

@@ -4,13 +4,16 @@ import UIKit
public final class Image: Component {
public let image: UIImage?
public let tintColor: UIColor?
public let size: CGSize?
public init(
image: UIImage?,
tintColor: UIColor? = nil
tintColor: UIColor? = nil,
size: CGSize? = nil
) {
self.image = image
self.tintColor = tintColor
self.size = size
}
public static func ==(lhs: Image, rhs: Image) -> Bool {
@@ -20,6 +23,9 @@ public final class Image: Component {
if lhs.tintColor != rhs.tintColor {
return false
}
if lhs.size != rhs.size {
return false
}
return true
}
@@ -36,7 +42,7 @@ public final class Image: Component {
self.image = component.image
self.tintColor = component.tintColor
return availableSize
return component.size ?? availableSize
}
}