SearchInAppsSDK Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
Layout
@objc(SearchSuggestionsViewOptionsLayout)
enum Layout
The layout options for the search suggestions view.
-
The raw type that can be used to represent all values of the conforming
type.
Every distinct value of the conforming type has a corresponding unique
value of the RawValue
type, but there may be values of the RawValue
type that don’t have a corresponding value of the conforming type.
Declaration
Swift
typealias RawValue = Int
-
In this layout, search suggestions will be displayed in two lines, one for the headline and
one for the search suggestions which is horizontally scrollable.
-
In this layout, search suggestions will be displayed in a single line, and users should
swipe horizontally to view more suggestions.
Declaration
Swift
case compactCarousel
-
Creates a new instance with the specified raw value.
If there is no value of the type that corresponds with the specified raw
value, this initializer returns nil
. For example:
enum PaperSize: String {
case A4, A5, Letter, Legal
}
print(PaperSize(rawValue: "Legal"))
// Prints "Optional("PaperSize.Legal")"
print(PaperSize(rawValue: "Tabloid"))
// Prints "nil"
Declaration
Swift
init?(rawValue: Int)
-
The corresponding value of the raw type.
A new instance initialized with rawValue
will be equivalent to this
instance. For example:
enum PaperSize: String {
case A4, A5, Letter, Legal
}
let selectedSize = PaperSize.Letter
print(selectedSize.rawValue)
// Prints "Letter"
print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!)
// Prints "true"
Declaration
Swift
var rawValue: Int { get }
-
In this layout, search suggestions will all be displayed in multiple lines like tiling at
the very beginning.
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-06 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-06 UTC."],[[["\u003cp\u003eLayout options determine how search suggestions are displayed within the SearchInAppsSDK.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecarousel\u003c/code\u003e layout uses two lines, one for headlines and a horizontally scrollable line for suggestions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecompactCarousel\u003c/code\u003e layout uses a single, horizontally scrollable line for all suggestions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003etiling\u003c/code\u003e layout displays suggestions in a multi-line, tile-like format.\u003c/p\u003e\n"]]],["The `SearchSuggestionsViewOptionsLayout` enum defines layout options for search suggestions. It has a `RawValue` type of `Int`. Three layout cases are: `carousel` (two lines, horizontally scrollable), `compactCarousel` (single line, horizontally swipeable), and `tiling` (multiple lines). Instances can be initialized with a raw integer value using `init?(rawValue:)`. Each instance has a corresponding `rawValue` that represents it.\n"],null,["# SearchInAppsSDK Framework Reference\n\nLayout\n======\n\n @objc(SearchSuggestionsViewOptionsLayout)\n enum Layout\n\nThe layout options for the search suggestions view.\n- `\n ``\n ``\n `\n\n ### [RawValue](#/s:15SearchInAppsSDK0A22SuggestionsViewOptionsC6LayoutO8RawValuea)\n\n `\n ` \n The raw type that can be used to represent all values of the conforming\n type.\n\n Every distinct value of the conforming type has a corresponding unique\n value of the `RawValue` type, but there may be values of the `RawValue`\n type that don't have a corresponding value of the conforming type. \n\n #### Declaration\n\n Swift \n\n typealias RawValue = Int\n\n- `\n ``\n ``\n `\n\n ### [carousel](#/s:15SearchInAppsSDK0A22SuggestionsViewOptionsC6LayoutO8carouselyA2EmF)\n\n `\n ` \n In this layout, search suggestions will be displayed in two lines, one for the headline and\n one for the search suggestions which is horizontally scrollable. \n\n #### Declaration\n\n Swift \n\n case carousel\n\n- `\n ``\n ``\n `\n\n ### [compactCarousel](#/s:15SearchInAppsSDK0A22SuggestionsViewOptionsC6LayoutO15compactCarouselyA2EmF)\n\n `\n ` \n In this layout, search suggestions will be displayed in a single line, and users should\n swipe horizontally to view more suggestions. \n\n #### Declaration\n\n Swift \n\n case compactCarousel\n\n- `\n ``\n ``\n `\n\n ### [init(rawValue:)](#/s:15SearchInAppsSDK0A22SuggestionsViewOptionsC6LayoutO8rawValueAESgSi_tcfc)\n\n `\n ` \n Creates a new instance with the specified raw value.\n\n If there is no value of the type that corresponds with the specified raw\n value, this initializer returns `nil`. For example: \n\n enum PaperSize: String {\n case A4, A5, Letter, Legal\n }\n\n print(PaperSize(rawValue: \"Legal\"))\n // Prints \"Optional(\"PaperSize.Legal\")\"\n\n print(PaperSize(rawValue: \"Tabloid\"))\n // Prints \"nil\"\n\n #### Declaration\n\n Swift \n\n init?(rawValue: Int)\n\n- `\n ``\n ``\n `\n\n ### [rawValue](#/s:15SearchInAppsSDK0A22SuggestionsViewOptionsC6LayoutO8rawValueSivp)\n\n `\n ` \n The corresponding value of the raw type.\n\n A new instance initialized with `rawValue` will be equivalent to this\n instance. For example: \n\n enum PaperSize: String {\n case A4, A5, Letter, Legal\n }\n\n let selectedSize = PaperSize.Letter\n print(selectedSize.rawValue)\n // Prints \"Letter\"\n\n print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!)\n // Prints \"true\"\n\n #### Declaration\n\n Swift \n\n var rawValue: Int { get }\n\n- `\n ``\n ``\n `\n\n ### [tiling](#/s:15SearchInAppsSDK0A22SuggestionsViewOptionsC6LayoutO6tilingyA2EmF)\n\n `\n ` \n In this layout, search suggestions will all be displayed in multiple lines like tiling at\n the very beginning. \n\n #### Declaration\n\n Swift \n\n case tiling"]]