vds_ios/VDS/Components/Label/Attributes/LabelAttributeModel.swift
Matt Bruce b4659a73c0 added equatble to label
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2022-09-15 16:45:56 -05:00

27 lines
618 B
Swift

//
// LabelAttributeModel.swift
// VDS
//
// Created by Matt Bruce on 8/3/22.
//
import Foundation
import UIKit
public protocol LabelAttributeModel: AnyEquatable, Withable, Equatable, Identifiable where ID == UUID {
var location: Int { get set }
var length: Int { get set }
func setAttribute(on attributedString: NSMutableAttributedString)
}
extension LabelAttributeModel {
public var range: NSRange {
NSRange(location: location, length: length)
}
public static func == (lhs: any LabelAttributeModel, rhs: any LabelAttributeModel) -> Bool {
lhs.isEqual(rhs)
}
}