Develop
2015.10.12 14:48
[ios] 상위 ViewController 가져오기
조회 수 1161 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
529 | Develop | [c] 최대공약수 알고리즘 (유클릿) | hooni | 2003.04.23 | 8905 |
528 | Develop | [js] jQjuery $ 활용 | hooni | 2013.12.17 | 8903 |
527 | Develop |
[c++] 채팅로봇 소스.. ㅋㄷㅋㄷ
![]() |
hooni | 2013.04.23 | 8902 |
526 | Develop | [c] 약수/최대공약수/완전수 알고리즘 | hooni | 2003.04.23 | 8892 |
525 | Develop | [js] 초간단 암호화/복호화 소스.. | hooni | 2003.04.23 | 8872 |
524 | Develop | [html] SVG(Scalable Vector Graphics) 간단 정리 | hooni | 2014.02.13 | 8865 |
523 | Develop | [c] 지나가는 패킷 잡기 | hooni | 2003.04.23 | 8863 |
522 | Develop |
[c++] 윈도우 프로세스뷰어 분석.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 8859 |
521 | Develop | [c] 함수 요약 (검색해서 쓰세요..) | hooni | 2003.04.23 | 8832 |
520 | Develop |
[c++] mfc 이용한 트레이아이콘(TrayIcon) 클래스 예제 프로젝트
![]() |
hooni | 2013.04.23 | 8821 |
519 | Develop |
[c++] 레지스트리 등록 예제
1 ![]() |
hooni | 2013.04.23 | 8814 |
518 | Develop |
[java] 채팅창 처럼.. swing..
![]() |
hooni | 2013.04.23 | 8792 |