TKAutocompletionResult

public struct TKAutocompletionResult
extension TKAutocompletionResult: Equatable
extension TKAutocompletionResult: Hashable
extension TKAutocompletionResult: Comparable

Undocumented

  • Undocumented

    Declaration

    Swift

    public init(object: AnyHashable, title: String, titleHighlightRanges: [NSRange] = [], subtitle: String? = nil, subtitleHighlightRanges: [NSRange] = [], image: TKImage, accessoryButtonImage: TKImage? = nil, accessoryAccessibilityLabel: String? = nil, score: Int = 0, isInSupportedRegion: Bool = true)
  • Undocumented

    Declaration

    Swift

    public weak var provider: AnyObject?
  • Undocumented

    Declaration

    Swift

    public let object: AnyHashable
  • Undocumented

    Declaration

    Swift

    public let title: String
  • Undocumented

    Declaration

    Swift

    public var titleHighlightRanges: [NSRange]
  • Undocumented

    Declaration

    Swift

    public var subtitle: String?
  • Undocumented

    Declaration

    Swift

    public var subtitleHighlightRanges: [NSRange]
  • Undocumented

    Declaration

    Swift

    public let image: TKImage
  • Undocumented

    Declaration

    Swift

    public var accessoryButtonImage: TKImage?
  • Undocumented

    Declaration

    Swift

    public var accessoryAccessibilityLabel: String?
  • Undocumented

    Declaration

    Swift

    public var isInSupportedRegion: Bool
  • A score of how this result should be ranked between 0 and 100

    0: probably not a good result 25: matches only in secondary information 50: an average match 75: an good result matching the user input w 100: this gotta be what the user wanted!

    Declaration

    Swift

    public var score: Int
  • Undocumented

    See more

    Declaration

    Swift

    public enum Icon : Int
  • Undocumented

    Declaration

    Swift

    public static func image(for type: Icon) -> TKImage
  • Undocumented

    Declaration

    Swift

    public static func distanceScore(from coordinate: CLLocationCoordinate2D, to region: MKCoordinateRegion, longDistance: Bool) -> Int
  • Undocumented

    See more

    Declaration

    Swift

    public struct Score : ExpressibleByIntegerLiteral
  • Undocumented

    See more

    Declaration

    Swift

    public struct ScoreHighlights
  • 0: not match, e.g., we’re missing a word 25: same words but wrong order 33: has all target words but missing a completed one 50: matches somewhere in the word 66: contains all words in right order 75: matches start of word in search term (but starts don’t match) 100: exact match at start

    Declaration

    Swift

    public static func nameScore(searchTerm fullTarget: String, candidate fullCandidate: String) -> Score
  • Undocumented

    Declaration

    Swift

    public static func rangedScore(for score: Int, min: Int, max: Int) -> Int
  • Declaration

    Swift

    public static func == (lhs: TKAutocompletionResult, rhs: TKAutocompletionResult) -> Bool
  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)
  • Declaration

    Swift

    public static func < (lhs: TKAutocompletionResult, rhs: TKAutocompletionResult) -> Bool