Contents

Develop
2015.10.12 14:48

[ios] 상위 ViewController 가져오기

조회 수 949 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

상위 ViewController 가져오기

 

UIViewController *vc;

vc = (UIViewController*)[btn.superview nextResponder];

vc = (UIViewController*)[view.superview nextResponder];

 

nextResponder

Returns the receiver'€™s next responder, or nil if it has none.

- (UIResponder *)nextResponder
Return Value

The next object in the responder chain to be presented with an event for handling.

Discussion

The UIResponder class does not store or set the next responder automatically, instead returning nil by default. Subclasses must override this method to set the next responder. UIViewimplements this method by returning the UIViewController object that manages it (if it has one) or its superview (if it doesn’t); UIViewController implements the method by returning its view’s superview; UIWindow returns the application object, and UIApplication returns nil.

Availability
  • Available in iOS 2.0 and later.
Declared In

UIResponder.h 


?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
109 Develop [c] 간단한 순위 루틴.. (정보처리기사) hooni 2003.04.23 6874
108 Develop [c] fgets() 함수 사용하기.. hooni 2003.04.23 7818
107 Develop [c] 싱글, 더블 링크리스트(linked list)로 만든 예제.. file hooni 2003.04.23 6737
106 Develop [c] 컴파일러 선행처리기 따라하기.. file hooni 2003.04.23 6681
105 Develop [c] 구조체/파일 입출력 프로그램 file hooni 2003.04.23 7063
104 Develop [c++] 더블 링크리스트(linked list) 학습용 초간단 단어장 file hooni 2003.04.23 9323
103 Develop [c] OpenGL 직사각형(2D) 크기 확대/축소 hooni 2003.04.23 9069
102 Develop [jsp] 정적/동적(차트생성) 이미지 전달 file hooni 2003.04.23 7307
101 Develop [c] 프로세스간의 통신(파이프) hooni 2003.04.23 6891
100 Develop [c] 구조체의 설명과 예제.. hooni 2003.04.23 8373
99 Develop [c] 포인터와 함수포인터에 대해.. hooni 2003.04.23 8019
98 Develop [c] 스토리지 클래스(변수) hooni 2003.04.23 8197
Board Pagination Prev 1 ... 57 58 59 60 61 62 63 64 65 66 ... 71 Next
/ 71