RecentItem
public struct RecentItem : Equatable, Codable
Struct, which represents recently found search item on CarPlay. When storing recent items in an array
use dedicated methods for addition: [RecentItem].add(_:)
, and removal: [RecentItem].remove(_:)
.
-
Property, which contains information regarding geocoder result.
Declaration
Swift
public private(set) var navigationGeocodedPlacemark: NavigationGeocodedPlacemark { get }
-
Initializes a newly created
RecentItem
instance, with a geocoded data stored inNavigationGeocodedPlacemark
.Declaration
Swift
public init(_ navigationGeocodedPlacemark: NavigationGeocodedPlacemark)
Parameters
navigationGeocodedPlacemark
A
NavigationGeocodedPlacemark
instance, which contains information regarding geocoder result. -
Loads a list of
RecentItem
s, which is serialized into a file stored inrecentItemsPathURL
.Declaration
Swift
public static func loadDefaults() -> [RecentItem]
-
Method, which allows to verify, whether current
RecentItem
instance contains data, which is similar to data provided insearchText
parameter.Declaration
Swift
public func matches(_ searchText: String) -> Bool
Parameters
searchText
Text, which will be used for performing search.
-
Declaration
Swift
public static func == (lhs: RecentItem, rhs: RecentItem) -> Bool