Contents

Develop
2015.10.12 14:48

[ios] 상위 ViewController 가져오기

조회 수 982 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
177 Etc 양성/음성 오류에 대한 개념 hooni 2013.04.23 19861
176 System/OS [windows] 여러가지 활용 팁 hooni 2003.04.23 19983
175 Develop [c] AES 알고리즘 (암호화/복호화) file hooni 2003.04.23 20069
174 Develop [c] UTF-8을 EUC-KR로 변환.. (iconv) file hooni 2013.04.23 20150
173 Develop [ios] UIView에서 상위 UIViewController 가져오기 hooni 2013.09.27 20167
172 System/OS [linux] 꿀통(honeyd) 설치하기.. 메뉴얼 과정 6 file hooni 2006.04.23 20232
171 Develop [php] substr() 한글 자를 때 깨짐 방지 hooni 2014.01.09 20378
170 Develop [android] [번역] 안드로이드 Android Cloud to Device Messaging(C2DM) hooni 2013.04.23 20427
169 Develop [opengl] 컴퓨터 그래픽스 강의 자료(수업자료) file hooni 2003.04.23 20441
168 System/OS asx미디어 정보 기록.. hooni 2003.04.23 20543
167 Develop git 브런치 배우기 (링크) hooni 2013.07.09 20583
166 Develop [c++] 디렉토리 내의 파일 찾기 FindFirstFile() 함수 6 hooni 2013.04.23 20599
Board Pagination Prev 1 ... 79 80 81 82 83 84 85 86 87 88 ... 98 Next
/ 98