//設置代理 和方法 屬性
@protocol detailNoteProtocol <NSObject]]>
- (void)aa;
@end
//聲明代理屬性
@property (nonatomic, assign)id<detailNoteProtocol>delegate;
//制定接受代理方
if (_delegate &&
[_delegate respondsToSelector:@selector(aa)])
{
[_delegate aa];
}
接受代理
在.h 裏面
引入頭文件, 接受代理協議,
在.m 裏面
實現代理方法 , 記着寫 : _detailVC.delegate = self;