我有 A -> B ->C 控制器,与下一个委托链接:
@protocol ViewControllerDelegate <NSObject>
- (void)onResult:(ControllerDelegateObject *)delegateObject;
@end
在 CI 调用中:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
ControllerDelegateObject *object = [[ControllerDelegateObject alloc]init];
object.model = indexPath.row;
[delegate onResult:object];
[ self.navigationController popViewControllerAnimated:YES ];
}
比我进入B:
-(void)onResult:(ControllerDelegateObject *)delegateObject{
delegateObject.brand = self.chosenBrand;
[delegate onResult:delegateObject];
[ self.navigationController popViewControllerAnimated:YES ]; **//doesn't work**
NSLog(@"TEST2");
}
为什么在委托回调中没有第二次调用 [ self.navigationController popViewControllerAnimated:YES ]?