I have a problem with Objective-C protocols.
I have defined protocol:
@protocol PlayerProfileSectionProReviewDelegate <NSObject>
- (void)didReceivedPlayerProfileSectionProReviewData;
@end
@interface PlayerProfileSectionProReviewModel : PlayerProfileSectionModel
@property (weak) id <PlayerProfileSectionProReviewDelegate> playerProfileSectionProReviewDelegate;
@end
In this class implementation I call delegate:
if ([self.playerProfileSectionProReviewDelegate respondsToSelector:@selector(didReceivedPlayerProfileSectionProReviewData)])
{
[self.playerProfileSectionProReviewDelegate didReceivedPlayerProfileSectionProReviewData];
}
In view controller I have added PlayerProfileSectionProReviewDelegate
and overriden didReceivedPlayerProfileSectionProReviewData
method:
@interface PlayerProfileSectionProReviewViewController : PlayerProfileSectionViewController <UITableViewDelegate, UITableViewDataSource, PlayerProfileSectionProReviewDelegate>
@end
and
#pragma mark <PlayerProfileSectionProReviewDelegate>
- (void)didReceivedPlayerProfileSectionProReviewData
{
[self.playerProReviewTableView reloadData];
}
Why my protocol does not respond to selector?