views:

28

answers:

1

In this part of my code I get a warning message saying it doesn't implement the custom protocol I made.

detailViewController.delegate = self;

How do I implement the protocol?

Then when I run the program it crashes saying

'-[DetailViewController setDelegate:]: unrecognized selector sent to instance 0x6a1c450'

+1  A: 

Declare your class like this:

@interface DetailViewController : UIViewController <MyProtocol> {
    // Class stuff
}
James Huddleston
That removes the warning message, but it still crashes.
awakeFromNib
can you give more code please ? How did you declare your protocol ? Property, ...
William Remacle