하위보기로 UINavigationController가있는 MyViewController가 있고 UINavigatioController에 스택에 대한 CustomView가 나타납니다. 내가하고 싶은 것은 CustomView에서 MyViewController의 메소드를 호출하는 것입니다. 그래서 이것을 시도했습니다 :부모보기 컨트롤러에서 함수/메서드를 호출하는 방법
UINavigationController *main = (UINavigationController*)[self parentViewController];
MyViewController *parentContainer = (MyViewController*)[main parentViewController];
[parentContainer myParentMethod];
이 코드는 올바르지 않습니다.
이 스레드가 발견되어 잘 작동합니다. http://stackoverflow.com/questions/3370666/call-method-in-nested-parent-controllers – Arcadian