Inherits from ABPersonViewController
Conforms to UIActionSheetDelegate
Declared in SCPersonController.h

Overview

Subclass of ABPersonViewController with C2Call specific functionality

The SCPersonController shows a VCARD contact received via Rich Media Message.

Please use showContact: from UIViewController+SCCustomViewController.h to present this controller programmatically.

Tasks

Properties

Other Methods

Actions

Properties

showToolbar

Flag - Show Toolbar.

@property (nonatomic, assign) BOOL showToolbar

Declared In

SCPersonController.h

vcard

VCARD as String.

@property (nonatomic, strong) NSString *vcard

Declared In

SCPersonController.h

vcardKey

Rich Media Key for VCARD.

@property (nonatomic, strong) NSString *vcardKey

Declared In

SCPersonController.h

Instance Methods

contentAction:

Shows the Content Action PopupMenu.

- (IBAction)contentAction:(id)sender

Parameters

sender
  • The initiator of the action

Discussion

Default Implementation:

SCPopupMenu *cv = [SCPopupMenu popupMenu:self];

[cv addChoiceWithName:NSLocalizedString(@"Save Contact", @"MenuItem") andSubTitle:NSLocalizedString(@"Save to Contacts", @"Button") andIcon:[UIImage imageNamed:@"ico_save_in_contacts"] andCompletion:^{

    CFErrorRef error = NULL;
    ABAddressBookAddRecord(self.addressBook, self.displayedPerson, &error);

    if (error == NULL) {
        ABAddressBookSave(self.addressBook, &error);
        [AlertUtil showContactSaved];
    } else {
        [AlertUtil showContactSavedError];
    }

}];


[cv addChoiceWithName:NSLocalizedString(@"Forward", @"MenuItem") andSubTitle:NSLocalizedString(@"Forward to another user", @"Button") andIcon:[UIImage imageNamed:@"ico_forward"] andCompletion:^{
    [self forwardContact];
}];

[cv addCancelWithName:NSLocalizedString(@"Cancel", @"Button") andCompletion:^{

}];

[cv showMenu];

Declared In

SCPersonController.h

forwardContact

Forwards Contact Action.

- (void)forwardContact

Declared In

SCPersonController.h

openMessageForNumber:

Opens SCChatController for the given phone number.

- (void)openMessageForNumber:(id)number

Parameters

number
  • Phone number in international format

Declared In

SCPersonController.h