我有三個ViewController; A,B,和C.設置委託給自己的委託?
A給出B,B給出C.
如何從C中傳遞數據回A?
我設置B的委託A.
BViewController *bvc = [self.storyboard instantiateViewControllerWithIdentifier:@"B"];
bvc.delegate = self;
我罐體C的委託設置爲A不知何故?
喜歡:
CViewController *cvc = [self.storyboard instantiateViewControllerWithIdentifier:@"C"];
cvc.delegate = (self's parent delegate)
?
還是我需要將C的代表設置爲B,然後是A?
目前的手段推或模式? –
目前意味着莫代爾,對不起。 – Padin215
我認爲你的代碼/邏輯存在一些問題。 'bvc.delegate =(self的父代理)'沒有意義,它應該是'bvc.delegate = self' ...如果我明白你想要做什麼。 –