Contact list is empty | Contact list is not empty |
| |
TUIKit
or TUIContact
.TUILogin
login
API to log in to the component.TUIContactController
object and display it.#import "TUIContactController_Minimalist.h"// ContactController is your own ViewController@implementation ContactController- (void)viewDidLoad {// Create TUIContactController_MinimalistTUIContactController_Minimalist *vc = [[TUIContactController_Minimalist alloc] init];// Option 1: push vc.[self.navigationController pushViewController:vc animated:YES];// Option 2: add vc to your own ViewController.// [self addChildViewController:vc];// [self.view addSubview:vc.view];}@end
#import "TUIContactController.h"// ContactController is your own ViewController@implementation ContactController- (void)viewDidLoad {// Create TUIContactControllerTUIContactController *vc = [[TUIContactController alloc] init];// Option 1: push vc.[self.navigationController pushViewController:vc animated:YES];// Option 2: add vc to your own ViewController.// [self addChildViewController:vc];// [self.view addSubview:vc.view];}@end
TUIContact
handles click actions in this interface by default, as follows:Action | Effect |
Click on New Contacts | Display pending friend requests |
Click on Group Chats | Display all group chats for the currently logged-in account |
Click on Blocked List | Display the blocklist for the currently logged-in account |
Click on the contact's avatar | Enter the Contact Management interface |
Click on the + sign at the top right of the interface | A pop-up menu with Add to Contacts and Add Group |
Add to Contacts
, and clicking on Group Chats
, you can customize the behavior by implementing the methods in TUIContactControllerListener
@protocol TUIContactControllerListener_Minimalist <NSObject>@optional- (void)onSelectFriend:(TUICommonContactCell *)cell;- (void)onAddNewFriend:(TUICommonTableViewCell *)cell;- (void)onGroupConversation:(TUICommonTableViewCell *)cell;@end
@protocol TUIContactControllerListener <NSObject>@optional- (void)onSelectFriend:(TUICommonContactCell *)cell;- (void)onAddNewFriend:(TUICommonTableViewCell *)cell;- (void)onGroupConversation:(TUICommonTableViewCell *)cell;@end
Was this page helpful?