Contents

Develop
2015.10.12 14:48

[ios] 상위 ViewController 가져오기

조회 수 1154 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
129 Develop [c] 단어 입력/수정 프로그램 소스 file hooni 2003.04.23 7048
128 Develop [c] 농구팀 점수 산출 프로그램 소스 file hooni 2003.04.23 7403
127 Develop [자료구조] 트리(tree) 용어정리 file hooni 2003.04.23 11098
126 Develop [c] 이진트리(binary tree)의 특성 file hooni 2003.04.23 9628
125 Develop [c] 이진트리(binary tree)의 운행.. hooni 2003.04.23 8293
124 Develop [c] 근의 공식으로 2차방정식 풀기.. file hooni 2003.04.23 7805
123 Develop [c] 학생명단 관리 프로그램 소스 ㅋㅋ 1 file hooni 2003.04.23 7799
122 Develop [jsp][php] 간단한 강좌 자료.. file hooni 2003.04.23 8137
121 Develop [c] flooding 알고리즘 미로 찾기(도스용) 소스코드 9 file hooni 2003.04.23 12579
120 Develop [c] 테트리스(Tetris) 게임(도스용) 소스코드 file hooni 2003.04.23 11506
119 Develop [c] 파일입출력, 링크리스트(linked list)를 이용한 주소록(도스용) 소스코드 1 file hooni 2003.04.23 11184
118 Develop [c] 간단한 자료구조(stack, queue, linked list) 구현 소스 6 file hooni 2003.04.23 10151
Board Pagination Prev 1 ... 83 84 85 86 87 88 89 90 91 92 ... 98 Next
/ 98