Develop
2015.10.12 14:48
[ios] 상위 ViewController 가져오기
조회 수 942 댓글 0
상위 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. UIView
implements 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.
See Also
Declared In
UIResponder.h
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
1017 | Develop | 프로그래밍에서 foo, bar 함수의 유래 | hooni | 2013.06.25 | 21237 |
1016 | Etc | [flash] 자동차 엔진의 원리 (4행정 사이클 그림) | hooni | 2013.04.23 | 21219 |
1015 | Develop | [c] 포인터 학습용 예제 소스 코드 | hooni | 2013.04.23 | 21025 |
1014 | PPT | [doc] 발표 자료 ㅎㅎtalk4neo | hooni | 2013.04.23 | 20983 |
1013 | Etc | 영어. 외우면 도움되는 필수영어회화 표현 | hooni | 2013.09.09 | 20918 |
1012 | Develop | [c] 이진트리/트리 순회법 코드(전위/중위/후위) 5 | hooni | 2015.07.02 | 20914 |
1011 | PPT | [ppt] 시스템보안 연구실 ppt 템플릿.. (CIST) | hooni | 2013.04.23 | 20853 |
1010 | System/OS | [windows] 윈도우 사용자 계정 로그인 암호 분실, 암호 변경하는 방법 | hooni | 2015.07.09 | 20840 |
1009 | System/OS | [doc] 코코아 프로그래밍 for MACOS 관련 내 분량.. | hooni | 2013.04.23 | 20836 |
1008 | Develop | git 브런치 배우기 (링크) | hooni | 2013.07.09 | 20571 |
1007 | Develop | [c++] 디렉토리 내의 파일 찾기 FindFirstFile() 함수 6 | hooni | 2013.04.23 | 20564 |
1006 | System/OS | asx미디어 정보 기록.. | hooni | 2003.04.23 | 20533 |