משתמשים עם הרשאות גישה לממשק המשתמש

אנחנו מספקים רשימה של גורמים שיכולים להשתמש בממשק המשתמש למטרות התאמה אישית ומעקב.

הענקת גישה לקבלת התראות על פעולות לחיצה

אפשר להעביר במכונה בעל גישה (SearchContentClickNotificationDelegate) כדי להגיב לפעולת הקליק בממשק המשתמש.

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;
...