Conforms to NSObject
Declared in PSHChatViewController.h

Overview

PSHChatViewDelegate provides callbacks for events triggered by an instance of PSHChatViewController, or in other words: app user is sending/reading messages to/from other users in a chat. Developers must set the PSHChatViewController instance delegate property and implement its methods in order to handle those events and offer to the user the desired chat behaviour. They also must take into account that whenever instantiateMainTabBarViewController method of PSHEngine is used to present all the tabbed view, the SDK assumes that app delegate implements PSHChatViewDelegate methods.

Instance Methods

PSHChatView:didSelectLinkWithPhoneNumber:

Triggered whenever the user taps on a phone number inside a text message.

- (void)PSHChatView:(PSHChatViewController *)chatView didSelectLinkWithPhoneNumber:(NSURL *)url

Parameters

chatView

PSHChatViewController instance.

url

Phone number boxed as an NSURL instance.

Declared In

PSHChatViewController.h

PSHChatView:didSelectLinkWithURL:

Triggered whenever the user taps on a link inside a text message.

- (void)PSHChatView:(PSHChatViewController *)chatView didSelectLinkWithURL:(NSURL *)url

Parameters

chatView

PSHChatViewController instance.

url

Link URL.

Declared In

PSHChatViewController.h

PSHChatView:didTapOnImageWithURL:

Triggered whenever the user taps on an image message.

- (void)PSHChatView:(PSHChatViewController *)chatView didTapOnImageWithURL:(NSURL *)imageURL

Parameters

chatView

PSHChatViewController instance.

imageURL

Image URL.

Declared In

PSHChatViewController.h

PSHChatView:presentMoviePlayerViewControllerAnimated:

Triggered whenever the user taps on a video message play icon. Developers should present the argument MPMoviePlayerViewController instance.

- (void)PSHChatView:(PSHChatViewController *)chatView presentMoviePlayerViewControllerAnimated:(MPMoviePlayerViewController *)newPlayerViewController

Parameters

chatView

PSHChatViewController instance.

newPlayerViewController

An instance of MPMoviePlayerViewController to present.

Declared In

PSHChatViewController.h

PSHChatView:savedContactViewController:

Triggered whenever the user taps on save contact.

- (void)PSHChatView:(PSHChatViewController *)chatView savedContactViewController:(ABPersonViewController *)newPersonViewController

Parameters

chatView

PSHChatViewController instance.

newPersonViewController

An instance of ABPersonViewController with the shared contact data.

Declared In

PSHChatViewController.h

PSHChatView:shouldPresentPeoplePickerNavigationController:

Triggered whenever the user tries to share a contact with other user/s. Developers should present the argument ABPeoplePickerNavigationController instance.

- (void)PSHChatView:(PSHChatViewController *)chatView shouldPresentPeoplePickerNavigationController:(ABPeoplePickerNavigationController *)newPeoplerPickerNavigationController

Parameters

chatView

PSHChatViewController instance.

newPeoplerPickerNavigationController

An instance of ABPeoplePickerNavigationController to present

Declared In

PSHChatViewController.h

PSHChatView:shouldPresentUIImagePickerController:

Triggered whenever the user tries to share an image or video with other user/s. Developers should present the argument UIImagePickerController instance.

- (void)PSHChatView:(PSHChatViewController *)chatView shouldPresentUIImagePickerController:(UIImagePickerController *)newImagePickerController

Parameters

chatView

PSHChatViewController instance.

newImagePickerController

An instance of ABPeoplePickerNavigationController to present.

Declared In

PSHChatViewController.h

PSHChatView:shouldPushContactViewController:

Triggered whenever the user taps on a shared contact message. Developers should push the argument ABPersonViewController instance ideally in a UINavigationController.

- (void)PSHChatView:(PSHChatViewController *)chatView shouldPushContactViewController:(ABPersonViewController *)newPersonViewController

Parameters

chatView

PSHChatViewController instance.

newPersonViewController

An instance of ABPersonViewController with the shared contact data.

Declared In

PSHChatViewController.h

PSHChatView:shouldPushLocationViewController:

Triggered whenever the user taps on a shared location message. Developers should push the argument UIViewController instance ideally in a UINavigationController.

- (void)PSHChatView:(PSHChatViewController *)chatView shouldPushLocationViewController:(UIViewController *)newViewController

Parameters

chatView

PSHChatViewController instance.

newViewController

An instance of UIViewController with a map with the shared location.

Declared In

PSHChatViewController.h

PSHChatViewDidLoad:

Triggered from the viewDidLoad as any UIViewController. When this method is callled is time to set PSHChatViewController instance shareActivities property (see PSHChatViewControllerShareActivity).

- (void)PSHChatViewDidLoad:(PSHChatViewController *)chatView

Parameters

chatView

PSHChatViewController instance.

Declared In

PSHChatViewController.h