Improve equality checking on layout attributes

This commit is contained in:
Steven Deutsch
2018-03-27 01:52:31 -05:00
parent f70e1c82aa
commit 577e1bdc21
4 changed files with 36 additions and 3 deletions
+10
View File
@@ -82,3 +82,13 @@ public struct AvatarPosition {
}
}
// MARK: - Equatable Conformance
extension AvatarPosition: Equatable {
public static func == (lhs: AvatarPosition, rhs: AvatarPosition) -> Bool {
return lhs.vertical == rhs.vertical && lhs.horizontal == rhs.horizontal
}
}
+10
View File
@@ -30,3 +30,13 @@ public struct LabelAlignment {
public var textInsets: UIEdgeInsets
}
// MARK: - Equatable Conformance
extension LabelAlignment: Equatable {
public static func == (lhs: LabelAlignment, rhs: LabelAlignment) -> Bool {
return lhs.textAlignment == rhs.textAlignment && lhs.textInsets == rhs.textInsets
}
}