Receive a warning when setting up a delegate for ABPeoplePickerNavigationController

I am trying to create an application with the following code snippets

Defining my interface

@interface CreateMessageViewController : UIViewController

and the method that I call as a result of the button click,

-(IBAction) handleEvents:(id) sender
 {
    if ((UIButton *) sender == openContact)
    {
       ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
       picker.peoplePickerDelegate = self;
       [self presentModalViewController:picker animated:YES];
       [picker release];
    }}

Now I get a warning for picker.peoplePickerDelegate = self;saying

warning: class 'CreateMessageViewController' does not implement the protocol 'ABPeoplePavlerNavigationControllerDelegate'

I can not remove the warning. Please help me in this regard.

Any help would be greatly appreciated

Thanks in advance!

0
source share
1 answer

peoplePickerDelegate , ABPeoplePickerNavigationControllerDelegate, (self - , ).

@interface CreateMessageViewController : UIViewController  <ABPeoplePickerNavigationControllerDelegate> {}

+1

Source: https://habr.com/ru/post/1543271/


All Articles