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 | Database | [sql] 간단한 SQL 문법 정리 | hooni | 2003.04.23 | 12547 |
1016 | System/OS | [sql] insert into select 사용하기 | hooni | 2013.04.23 | 27551 |
1015 | System/OS | [sql] alter table 쿼리 예제 | hooni | 2003.04.23 | 12459 |
1014 | Develop | [spring] 스프링 IoC/DI | hooni | 2013.04.23 | 11345 |
1013 | Develop | [sh] 쉘스크립트 if 비교 연산 | hooni | 2020.05.26 | 59006 |
1012 | Develop | [sh] html 안에 있는 img 다운 받는 쉘 스크립트 | hooni | 2020.05.26 | 623 |
1011 | Algorithm | [security] 블럭 암호에 대해서.. | hooni | 2013.04.23 | 17104 |
1010 | Algorithm | [security] RSA 암호화 설명과 예.. | hooni | 2013.04.23 | 16602 |
1009 | System/OS | [router] 시스코 라우터 명령어 모드.. | hooni | 2013.04.23 | 12942 |
1008 | System/OS | [router] 설정과 기본 명령어들 모음 | hooni | 2013.04.23 | 15669 |
1007 | System/OS | [router] 라우팅 프로토콜 BGP (간단한 세팅) | hooni | 2013.04.23 | 10947 |
1006 | Develop | [python][django] request.cookie 읽어오기 ㅋㅋㅋ (쓰기) | hooni | 2019.12.06 | 1674 |