UI Delegates
Stay organized with collections
Save and categorize content based on your preferences.
We provide a list of UI delegates for customization and monitoring purposes.
Click action notification delegate
You can pass in a delegate instance
(SearchContentClickNotificationDelegate
) to respond to the
UI click action.
Swift
...
class PartnerSearchContentClickNotificationDelegate: SearchContentClickNotificationDelegate {
func searchContentClicked(clickProperties: SearchContentClickProperties) {
...
}
}
...
let delegate: PartnerSearchContentClickNotificationDelegate? = PartnerSearchContentClickNotificationDelegate()
...
let customizationOptions = SearchSuggestionsViewOptions()
customizationOptions.clickNotificationDelegate = delegate
...
Objective-C
/// In the .h header file.
#import "googlemac/iPhone/Shared/SearchInApps/SDK/SourcesLib-Swift.h"
...
@interface PartnerSearchContentClickNotificationDelegate: NSObject<SearchContentClickNotificationDelegate>
@end
/// In the .m file.
#import "googlemac/iPhone/Shared/SearchInApps/SDK/SourcesLib-Swift.h"
...
@interface PartnerSearchContentClickNotificationDelegate () <SearchContentClickNotificationDelegate>
@end
@implementation PartnerSearchContentClickNotificationDelegate
- (void)searchContentClickedWithClickProperties: (SearchContentClickProperties *) properties
{
...
}
@end
...
PartnerSearchContentClickNotificationDelegate *_partnerSearchContentClickNotificationDelegate = [[PartnerSearchContentClickNotificationDelegate alloc] init];
...
SearchSuggestionsViewOptions *customizationOptions = [[SearchSuggestionsViewOptions alloc] init];
customizationOptions.clickNotificationDelegate = _partnerSearchContentClickNotificationDelegate;
...
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-05 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-05 UTC."],[[["UI delegates can be used for customization and monitoring."],["A `SearchContentClickNotificationDelegate` can be implemented to respond to UI click actions, allowing you to define custom behavior when search content is clicked."],["Sample code snippets in Swift and Objective-C demonstrate how to implement and set up the `SearchContentClickNotificationDelegate`."]]],["The provided content details how to implement a `SearchContentClickNotificationDelegate` to monitor UI click actions. This involves creating a delegate instance, either `PartnerSearchContentClickNotificationDelegate` in Swift or Objective-C, which implements the `searchContentClicked` method. This delegate is then assigned to the `clickNotificationDelegate` property within `SearchSuggestionsViewOptions` to receive notifications about click events. The delegate receives `SearchContentClickProperties` containing information about the click.\n"]]