以B控制器向A控制器传值为例:
1.B控制器设置@protocol anotherDelegate <NSObject>以及实现方法
@property (nonatomic,weak) id delegate;
要使用weak避免重复引用2.A控制器实现delegate
b.delegate = self;
实现方法
3.b控制器调用代理方法实现传值。
以B控制器向A控制器传值为例:
1.B控制器设置@protocol anotherDelegate <NSObject>以及实现方法
@property (nonatomic,weak) id delegate;
要使用weak避免重复引用2.A控制器实现delegate
b.delegate = self;
实现方法
3.b控制器调用代理方法实现传值。