SearchInAppsSDK Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
SearchSuggestionsViewOptions
@objc
class SearchSuggestionsViewOptions
This class provides all the options to customize the search suggestions UI view.
-
The layout options for the search suggestions view.
Declaration
Swift
@objc(SearchSuggestionsViewOptionsLayout)
enum Layout
-
The type of publisher that emits before the object has changed.
Declaration
Swift
@available(iOS, introduced: 14)
typealias ObjectWillChangePublisher = ObservableObjectPublisher
-
The theme options for the search suggestions view.
Declaration
Swift
@objc(SearchSuggestionsViewOptionsTheme)
enum Theme
-
The click notification delegate for the search suggestions view.
-
The specified fraction of the screen height to present the sheet. The valid value is between
0.5 and 1.0. iOS 16.0+ only.
Declaration
Swift
@objc
var customizedSheetHeightFraction: CGFloat
-
The specified detent option to render search sheet (e.g. medium/large).
-
The specified layout to render search suggestion chips (e.g. carousel)
Declaration
Swift
@objc
var layout: SearchSuggestionsViewOptions.Layout { get set }
-
The open URL delegate for the search suggestions view.
-
The specified theme to render search suggestion chips (e.g. light/dark mode)
Declaration
Swift
@objc
var theme: SearchSuggestionsViewOptions.Theme { get set }
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-11-07 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-11-07 UTC."],[[["\u003cp\u003e\u003ccode\u003eSearchSuggestionsViewOptions\u003c/code\u003e is a class used for customizing the search suggestions UI view within the SearchInApps SDK.\u003c/p\u003e\n"],["\u003cp\u003eIt provides options to control the layout, theme, and behavior of search suggestion chips, including their presentation style (e.g., sheet height, detent options).\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can utilize delegates like \u003ccode\u003eclickNotificationDelegate\u003c/code\u003e and \u003ccode\u003eopenURLDelegate\u003c/code\u003e to handle user interactions with the search suggestions.\u003c/p\u003e\n"],["\u003cp\u003eCustomization is achieved through properties like \u003ccode\u003elayout\u003c/code\u003e and \u003ccode\u003etheme\u003c/code\u003e, offering control over the visual appearance and arrangement of search suggestions.\u003c/p\u003e\n"],["\u003cp\u003eiOS 16.0+ introduces the \u003ccode\u003ecustomizedSheetHeightFraction\u003c/code\u003e property, allowing for specific control over the search sheet's height on compatible devices.\u003c/p\u003e\n"]]],["The `SearchSuggestionsViewOptions` class customizes the search suggestions UI. Key elements include `Layout` and `Theme` options for visual presentation, alongside `clickNotificationDelegate` and `openURLDelegate` for user interactions. The `customizedSheetHeightFraction` property sets the sheet's height on iOS 16+, while `detentOption` determines the sheet's rendering. Finally, `layout` and `theme` manage the display of search suggestion chips, with the `ObjectWillChangePublisher` indicating pre-change states.\n"],null,["# SearchInAppsSDK Framework Reference\n\nSearchSuggestionsViewOptions\n============================\n\n @objc\n class SearchSuggestionsViewOptions\n\nThis class provides all the options to customize the search suggestions UI view.\n- `\n ``\n ``\n `\n\n ### [Layout](../Classes/SearchSuggestionsViewOptions/Layout.html)\n\n `\n ` \n The layout options for the search suggestions view. \n\n #### Declaration\n\n Swift \n\n @objc(SearchSuggestionsViewOptionsLayout)\n enum Layout\n\n- `\n ``\n ``\n `\n\n ### [ObjectWillChangePublisher](#/s:15SearchInAppsSDK0A22SuggestionsViewOptionsC25ObjectWillChangePublishera)\n\n `\n ` \n The type of publisher that emits before the object has changed. \n\n #### Declaration\n\n Swift \n\n @available(iOS, introduced: 14)\n typealias ObjectWillChangePublisher = ObservableObjectPublisher\n\n- `\n ``\n ``\n `\n\n ### [Theme](../Classes/SearchSuggestionsViewOptions/Theme.html)\n\n `\n ` \n The theme options for the search suggestions view. \n\n #### Declaration\n\n Swift \n\n @objc(SearchSuggestionsViewOptionsTheme)\n enum Theme\n\n- `\n ``\n ``\n `\n\n ### [clickNotificationDelegate](#/c:@M@SearchInAppsSDK@objc(cs)SearchSuggestionsViewOptions(py)clickNotificationDelegate)\n\n `\n ` \n The click notification delegate for the search suggestions view. \n\n #### Declaration\n\n Swift \n\n @objc\n weak var clickNotificationDelegate: (any ../Protocols/SearchContentClickNotificationDelegate.html)?\n\n- `\n ``\n ``\n `\n\n ### [customizedSheetHeightFraction](#/c:@M@SearchInAppsSDK@objc(cs)SearchSuggestionsViewOptions(py)customizedSheetHeightFraction)\n\n `\n ` \n The specified fraction of the screen height to present the sheet. The valid value is between\n 0.5 and 1.0. iOS 16.0+ only. \n\n #### Declaration\n\n Swift \n\n @objc\n var customizedSheetHeightFraction: CGFloat\n\n- `\n ``\n ``\n `\n\n ### [detentOption](#/c:@M@SearchInAppsSDK@objc(cs)SearchSuggestionsViewOptions(py)detentOption)\n\n `\n ` \n The specified detent option to render search sheet (e.g. medium/large). \n\n #### Declaration\n\n Swift \n\n @objc\n var detentOption: ../Enums/DetentOptions.html\n\n- `\n ``\n ``\n `\n\n ### [layout](#/c:@M@SearchInAppsSDK@objc(cs)SearchSuggestionsViewOptions(py)layout)\n\n `\n ` \n The specified layout to render search suggestion chips (e.g. carousel) \n\n #### Declaration\n\n Swift \n\n @objc\n var layout: SearchSuggestionsViewOptions.../Classes/SearchSuggestionsViewOptions/Layout.html { get set }\n\n- `\n ``\n ``\n `\n\n ### [openURLDelegate](#/c:@M@SearchInAppsSDK@objc(cs)SearchSuggestionsViewOptions(py)openURLDelegate)\n\n `\n ` \n The open URL delegate for the search suggestions view. \n\n #### Declaration\n\n Swift \n\n @objc\n weak var openURLDelegate: (any ../Protocols/SearchContentOpenURLDelegate.html)?\n\n- `\n ``\n ``\n `\n\n ### [theme](#/c:@M@SearchInAppsSDK@objc(cs)SearchSuggestionsViewOptions(py)theme)\n\n `\n ` \n The specified theme to render search suggestion chips (e.g. light/dark mode) \n\n #### Declaration\n\n Swift \n\n @objc\n var theme: SearchSuggestionsViewOptions.../Classes/SearchSuggestionsViewOptions/Theme.html { get set }"]]