前两天看了一些关于delegate的东西
在以前的时候,老师上课也讲过,但是我们自己从来没用过,应该是没有想到过用它
就算老师讲的demo里面涉及的有,我就直接抄过来,也懒得考虑为什么要用它?怎么用才合适
cell.h
#import <UIKit/UIKit.h>
@protocol MyCellDelegate;
@interface ZMCell :UITableViewCell
@property(weak,nonatomic)id <MyCellDelegate>delegate;
-(void)customlizedWithData:(id)data findAllname:(NSArray *)array;
@end
@protocol MyCellDelegate <NSObject>
-(void)TapSomeButtons:(UIButton *)sender;
@end
cell.m-(void)TapRowBtn:(id)sender
{
UIButton *btn = (UIButton *)sender;
if ([self.delegaterespondsToSelector:@selector(TapSomeButtons:)])
{
[self.delegat