Event Delegate

The iOS SDK provides event delegates to listen to various events on the client app. Through these event delegates, TapTalk.io notifies the client app of events that happen on your app.

You will need to register the delegate objects to receive event callbacks from TapTalk.io.

Event Delegate Name

Description

Listens to general event changes in the application

TapTalkLiveDelegate

General events such as notifications will be notified through TapTalkLiveDelegate. A TapTalkLiveDelegate instance is required when initializing TapTalk.

Note: Make sure to add #import <TapTalkLive/TapTalkLive.h> before registering the delegate

ViewController.m
#import <TapTalkLive/TapTalkLive.h>

// Add TapTalkLiveDelegatedeclaration
@interface ViewController () <TapTalkLiveDelegate>

@end
  
@implementation ViewController
  
- (void)function {
    // Set TapTalkLive delegate to self
    [[TapTalkLive sharedInstance] setDelegate:self];
}

#pragma mark - Delegate

#pragma mark TapTalkLiveDelegate

- (void)didTappedCloseButtonInCreateCaseViewWithCurrentShownNavigationController:(UINavigationController *)navigationController {
  //Listen to event when user click close button in create case view    
}

- (void)didTappedCloseButtonInCaseListViewWithCurrentShownNavigationController:(UINavigationController *)navigationController {
    //Listen to event when user click close button in case list / room list view 
}



- (void)didTappedCloseButtonInHomePageViewWithCurrentShownNavigationController:(UINavigationController *)navigationController {
    // User closes the home page
}

- (void)didTappedCloseButtonInCreateCaseViewWithCurrentShownNavigationController:(UINavigationController *)navigationController {
    // User closes the create case form
}

- (void)didTappedCloseButtonInCaseListViewWithCurrentShownNavigationController:(UINavigationController *)navigationController {
    // User closes the case list page
}

- (void)seeAllMessagesButtonDidTappedWithCurrentShownNavigationController:(UINavigationController *)navigationController {
    // User taps the See All Messages button in home page
    // Implementing this will prevent opening the case list page by default
}

- (void)createNewMessageButtonDidTappedWithCurrentShownNavigationController:(UINavigationController *)navigationController {
    // User taps the New Messages button in home or case list page
    // Implementing this will prevent opening the create new case form by default
}

- (void)caseListItemDidTappedWithCurrentShownNavigationController:(UINavigationController *)navigationController lastMessage:(TAPMessageModel *)lastMessage {
    // User taps a case from a list in home or case list page
    // Implementing this will prevent opening the selected chat room by default
}

- (void)faqChildDidTapped:(TTLFaqModel *)faqModel currentShownNavigationController:(UINavigationController *)navigationController {
    // User taps a FAQ from a list in home or FAQ details page
    // Implementing this will prevent opening the selected FAQ details page by default
}

- (void)closeButtonInFaqDetailsViewDidTapped:(TTLFaqModel *)faqModel currentShownNavigationController:(UINavigationController *)navigationController {
    // User closes the FAQ details page
}

- (void)talkToAgentButtonDidTapped:(TTLFaqModel *)faqModel currentShownNavigationController:(UINavigationController *)navigationController {
    // User taps the Talk to Agent button in home or FAQ details page
    // Implementing this will prevent opening the create new case form by default
}
  
@end

Method Name

Invoked When

didTappedCloseButtonInHomePageViewWithCurrentShownNavigationController:

User closes the home page. Returns the currently shown navigation controller.

didTappedCloseButtonInCreateCaseViewWithCurrentShownNavigationController:

User closes the create case form page. Returns the currently shown navigation controller.

didTappedCloseButtonInCaseListViewWithCurrentShownNavigationController:

User closes the case list page. Returns the currently shown navigation controller.

seeAllMessagesButtonDidTappedWithCurrentShownNavigationController:

User taps the See All Messages button in home page. Returns the currently shown navigation controller.

createNewMessageButtonDidTappedWithCurrentShownNavigationController:

User taps the New Messages button in home or case list page. Returns the currently shown navigation controller.

caseListItemDidTappedWithCurrentShownNavigationController:lastMessage:

User taps a case from a list in home or case list page. Returns the currently shown navigation controller and selected case's last message.

faqChildDidTapped:currentShownNavigationController:

User taps a FAQ from a list in home or FAQ details page. Returns the selected FAQ Model and currently shown navigation controller.

closeButtonInFaqDetailsViewDidTapped:currentShownNavigationController:

User closes the FAQ details page. Returns the selected FAQ Model and currently shown navigation controller.

talkToAgentButtonDidTapped:currentShownNavigationController:

User taps the Talk to Agent button in home or FAQ details page. Returns the selected FAQ Model and currently shown navigation controller.

Last updated

#621:

Change request updated