This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protocol BinaryEquatable: Equatable { } | |
| extension BinaryEquatable { | |
| static func == (lhs: Self, rhs: Self) -> Bool { | |
| withUnsafeBytes(of: lhs) { lhsBytes -> Bool in | |
| withUnsafeBytes(of: rhs) { rhsBytes -> Bool in | |
| lhsBytes.elementsEqual(rhsBytes) | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| @IBDesignable | |
| class RoundedLabel: UILabel { | |
| var edgeInsets: UIEdgeInsets { | |
| if autoPadding { | |
| if cornerRadius == 0 { | |
| return UIEdgeInsets.zero | |
| } else { |