맞춤설정 및 모니터링 목적으로 UI 대리자의 목록을 제공합니다.
클릭 작업 알림 위임자
대리인 인스턴스(SearchContentClickNotificationDelegate
)를 전달하여 UI 클릭 작업에 응답할 수 있습니다.
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;
...