SearchInAppsSDK Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
SearchSuggestionsViewController
@interface SearchSuggestionsViewController : NSObject
A class to make it easier to use the SearchSuggestionsView in UIKit applications.
The way this is to be included in a UIViewController is to:
-
Create an instance of a SearchSuggestionsViewController with a specified customization option
_searchSuggestionsViewController = [[SearchSuggestionsViewController alloc] initWithCustomizationOption: [[SearchSuggestionsViewCustomizationOption alloc] init]];
-
Add this to the view controller
[_searchSuggestionsViewController addToViewController:self];
-
Add its view to the parent view
[self.view addSubview:_searchSuggestionsViewController.view];
-
Assign search suggestions to it to render those search suggestions.
dispatch_async(dispatch_get_main_queue(), ^{ _searchSuggestionsViewController.searchSuggestions = _searchSuggestions; }
-
The customization options of the search suggestions view.
-
The UIView of the search suggestions which is converted from the hostingController’s SwiftUI
rootview.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIView *_Nonnull view;
-
The search suggestions used to generate the UI.
Declaration
Objective-C
@property (nonatomic, strong) SearchSuggestions *_Nullable searchSuggestions;
-
-
Declaration
Objective-C
- (void)addToViewController:(UIViewController * _Nonnull)controller;
-
Declaration
Objective-C
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
-
Unavailable
-init is unavailable
Declaration
Objective-C
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-15 UTC.
[[["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-08-15 UTC."],[[["\u003cp\u003eSearchSuggestionsViewController simplifies the integration of SearchSuggestionsView into UIKit applications.\u003c/p\u003e\n"],["\u003cp\u003eIt allows for customization of the search suggestions view through the \u003ccode\u003ecustomizationOptions\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can readily access the underlying UIView via the \u003ccode\u003eview\u003c/code\u003e property for layout and integration purposes.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esearchSuggestions\u003c/code\u003e property is used to populate and display search suggestions within the view.\u003c/p\u003e\n"],["\u003cp\u003eIntegration involves initializing SearchSuggestionsViewController, adding it to the parent view controller, and assigning search suggestions data.\u003c/p\u003e\n"]]],["The `SearchSuggestionsViewController` class facilitates the use of `SearchSuggestionsView` in UIKit. Implementation involves creating an instance with customization options, adding it to a view controller, and incorporating its view into the parent view. Search suggestions are then assigned to this instance to render the UI. Key properties include `customizationOptions`, `view`, and `searchSuggestions`. Methods include `initWithOptions:` to set customization, and `addToViewController:` to integrate into a view controller. `init` and `new` are unavailable.\n"],null,["# SearchInAppsSDK Framework Reference\n\nSearchSuggestionsViewController\n===============================\n\n\n @interface SearchSuggestionsViewController : NSObject\n\nA class to make it easier to use the SearchSuggestionsView in UIKit applications.\nThe way this is to be included in a UIViewController is to:\n\n1. Create an instance of a SearchSuggestionsViewController with a specified customization option `_searchSuggestionsViewController = [[SearchSuggestionsViewController alloc] initWithCustomizationOption: [[SearchSuggestionsViewCustomizationOption alloc] init]];`\n2. Add this to the view controller `[_searchSuggestionsViewController addToViewController:self];`\n3. Add its view to the parent view `[self.view addSubview:_searchSuggestionsViewController.view];`\n4. Assign search suggestions to it to render those search suggestions. `dispatch_async(dispatch_get_main_queue(), ^{ _searchSuggestionsViewController.searchSuggestions = _searchSuggestions; }`\n- `\n ``\n ``\n `\n\n ### [customizationOptions](#/c:@M@SearchInAppsSDK@objc(cs)SearchSuggestionsViewController(py)customizationOptions)\n\n `\n ` \n The customization options of the search suggestions view. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, strong) ../Classes/SearchSuggestionsViewOptions.html *_Nonnull customizationOptions;\n\n- `\n ``\n ``\n `\n\n ### [view](#/c:@M@SearchInAppsSDK@objc(cs)SearchSuggestionsViewController(py)view)\n\n `\n ` \n The UIView of the search suggestions which is converted from the hostingController's SwiftUI\n rootview. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, strong, readonly) UIView *_Nonnull view;\n\n- `\n ``\n ``\n `\n\n ### [searchSuggestions](#/c:@M@SearchInAppsSDK@objc(cs)SearchSuggestionsViewController(py)searchSuggestions)\n\n `\n ` \n The search suggestions used to generate the UI. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, strong) ../Classes/SearchSuggestions.html *_Nullable searchSuggestions;\n\n- `\n ``\n ``\n `\n\n ### [-initWithOptions:](#/c:@M@SearchInAppsSDK@objc(cs)SearchSuggestionsViewController(im)initWithOptions:)\n\n `\n ` \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)initWithOptions:(../Classes/SearchSuggestionsViewOptions.html * _Nonnull)options OBJC_DESIGNATED_INITIALIZER;\n\n- `\n ``\n ``\n `\n\n ### [-addToViewController:](#/c:@M@SearchInAppsSDK@objc(cs)SearchSuggestionsViewController(im)addToViewController:)\n\n `\n ` \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n - (void)addToViewController:(UIViewController * _Nonnull)controller;\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:@M@SearchInAppsSDK@objc(cs)SearchSuggestionsViewController(im)init)\n\n `\n ` \n Unavailable \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init SWIFT_UNAVAILABLE;\n\n- `\n ``\n ``\n `\n\n ### [+new](#/c:@M@SearchInAppsSDK@objc(cs)SearchSuggestionsViewController(cm)new)\n\n `\n ` \n Unavailable\n\n -init is unavailable \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG(\"-init is unavailable\");"]]