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'
Declare your class like this:
@interface DetailViewController : UIViewController <MyProtocol> {
// Class stuff
}
精彩评论