The full description of the prediction as a NSAttributedString. E.g., “Sydney Opera House,
Sydney, New South Wales, Australia”.
Every text range that matches the user input has a kGMSAutocompleteMatchAttribute. For
example, you can make every match bold using enumerateAttribute:
The straight line distance in meters between the origin and this prediction if a valid origin is
specified in the GMSAutocompleteFilter of the request.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-08 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSAutocompletePrediction\u003c/code\u003e objects represent predicted search queries based on partial user input.\u003c/p\u003e\n"],["\u003cp\u003ePredictions include attributed text for the full description, primary text (place name), and secondary text (location).\u003c/p\u003e\n"],["\u003cp\u003eEach prediction provides a \u003ccode\u003eplaceID\u003c/code\u003e for detailed place information requests and an array of \u003ccode\u003etypes\u003c/code\u003e describing the result.\u003c/p\u003e\n"],["\u003cp\u003eOptionally, \u003ccode\u003edistanceMeters\u003c/code\u003e indicates the distance from the origin specified in the request's filter.\u003c/p\u003e\n"]]],["`GMSAutocompletePrediction` offers details about a predicted query based on partial input. It provides `attributedFullText`, `attributedPrimaryText`, and `attributedSecondaryText` as formatted strings, with matching text highlighted via `kGMSAutocompleteMatchAttribute`. Key properties include `placeID` for place details, `types` for result classifications, and `distanceMeters` for distance if requested. It also demonstrates how to highlight matched text in `attributedFullText`. Lastly the `init` method is unavailable.\n"],null,["# GooglePlaces Framework Reference\n\nGMSAutocompletePrediction\n=========================\n\n @interface GMSAutocompletePrediction : NSObject\n\nThis class represents a prediction of a full query based on a partially typed string.\n- `\n ``\n ``\n `\n\n ### [attributedFullText](#/c:objc(cs)GMSAutocompletePrediction(py)attributedFullText)\n\n `\n ` \n The full description of the prediction as a NSAttributedString. E.g., \"Sydney Opera House,\n Sydney, New South Wales, Australia\".\n\n Every text range that matches the user input has a [kGMSAutocompleteMatchAttribute](../Constants/kGMSAutocompleteMatchAttribute.html). For\n example, you can make every match bold using enumerateAttribute: \n\n ```\n UIFont *regularFont = [UIFont systemFontOfSize:[UIFont labelFontSize]];\n UIFont *boldFont = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];\n\n NSMutableAttributedString *bolded = [prediction.attributedFullText mutableCopy];\n [bolded enumerateAttribute:kGMSAutocompleteMatchAttribute\n inRange:NSMakeRange(0, bolded.length)\n options:0\n usingBlock:^(id value, NSRange range, BOOL *stop) {\n UIFont *font = (value == nil) ? regularFont : boldFont;\n [bolded addAttribute:NSFontAttributeName value:font range:range];\n }];\n\n label.attributedText = bolded;\n \n ```\n\n \u003cbr /\u003e\n\n #### Declaration\n\n Swift \n\n @NSCopying var attributedFullText: NSAttributedString { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSAttributedString *_Nonnull attributedFullText;\n\n- `\n ``\n ``\n `\n\n ### [attributedPrimaryText](#/c:objc(cs)GMSAutocompletePrediction(py)attributedPrimaryText)\n\n `\n ` \n The main text of a prediction as a NSAttributedString, usually the name of the place.\n E.g. \"Sydney Opera House\".\n\n Text ranges that match user input are have a [kGMSAutocompleteMatchAttribute](../Constants/kGMSAutocompleteMatchAttribute.html),\n like [attributedFullText](../Classes/GMSAutocompletePrediction.html#/c:objc(cs)GMSAutocompletePrediction(py)attributedFullText). \n\n #### Declaration\n\n Swift \n\n @NSCopying var attributedPrimaryText: NSAttributedString { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSAttributedString *_Nonnull attributedPrimaryText;\n\n- `\n ``\n ``\n `\n\n ### [attributedSecondaryText](#/c:objc(cs)GMSAutocompletePrediction(py)attributedSecondaryText)\n\n `\n ` \n The secondary text of a prediction as a NSAttributedString, usually the location of the place.\n E.g. \"Sydney, New South Wales, Australia\".\n\n Text ranges that match user input are have a [kGMSAutocompleteMatchAttribute](../Constants/kGMSAutocompleteMatchAttribute.html), like\n [attributedFullText](../Classes/GMSAutocompletePrediction.html#/c:objc(cs)GMSAutocompletePrediction(py)attributedFullText).\n\n May be nil. \n\n #### Declaration\n\n Swift \n\n @NSCopying var attributedSecondaryText: NSAttributedString? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly, nullable) NSAttributedString *attributedSecondaryText;\n\n- `\n ``\n ``\n `\n\n ### [placeID](#/c:objc(cs)GMSAutocompletePrediction(py)placeID)\n\n `\n ` \n A property representing the place ID of the prediction, suitable for use in a place details\n request. \n\n #### Declaration\n\n Swift \n\n var placeID: String { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSString *_Nonnull placeID;\n\n- `\n ``\n ``\n `\n\n ### [types](#/c:objc(cs)GMSAutocompletePrediction(py)types)\n\n `\n ` \n The types of this autocomplete result. Types are NSStrings, valid values are any types\n documented at \u003chttps://developers.google.com/places/ios-sdk/supported_types\u003e. \n\n #### Declaration\n\n Swift \n\n var types: [String] { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSArray\u003cNSString *\u003e *_Nonnull types;\n\n- `\n ``\n ``\n `\n\n ### [distanceMeters](#/c:objc(cs)GMSAutocompletePrediction(py)distanceMeters)\n\n `\n ` \n The straight line distance in meters between the origin and this prediction if a valid origin is\n specified in the [GMSAutocompleteFilter](../Classes/GMSAutocompleteFilter.html) of the request. \n\n #### Declaration\n\n Swift \n\n var distanceMeters: NSNumber? { get }\n\n Objective-C \n\n @property (nonatomic, readonly, nullable) NSNumber *distanceMeters;\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMSAutocompletePrediction(im)init)\n\n `\n ` \n Unavailable \n Initializer is not available. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init;"]]