Develop
2015.10.12 14:48
[ios] 상위 ViewController 가져오기
조회 수 960 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
741 | Develop | [js] 자바스크립트 이벤트 핸들.. | hooni | 2003.04.23 | 7908 |
740 | Develop | [js] 자바스크립트 메뉴얼 사이트.. ㅋㅋ | hooni | 2013.04.23 | 7413 |
739 | Develop | [js] 자바스크립트 escape()를 PHP로 받기 | hooni | 2013.04.23 | 5990 |
738 | Develop | [js] 인터넷 주소(URL) 인코딩 ㅋㅋ | hooni | 2013.04.23 | 11353 |
737 | Develop | [js] 이벤트 핸들러(Event Handlers) | hooni | 2003.04.23 | 6729 |
736 | Develop | [js] 이벤트 전파 3단계 | hooni | 2013.12.18 | 9966 |
735 | Develop | [js] 이미지 사이즈를 동적으로 조절.. | hooni | 2013.04.23 | 7474 |
734 | Develop | [js] 이미지 미리 로딩하기 | hooni | 2003.04.23 | 7008 |
733 | Develop | [js] 윤동이가 만든 영어 학습(?) 프로그램 | hooni | 2013.04.23 | 6462 |
732 | Develop | [js] 윈도우 시작버튼처럼 나오는 메뉴 | hooni | 2013.04.23 | 6743 |
731 | Develop | [js] 웹페이지에서 특정 엘리먼트 드래그, 복사, 컨텍스트메뉴, 키보드 막기 | hooni | 2013.11.04 | 30063 |
730 | Develop | [js] 여러가지 트리(tree) 모음.. ㅋㅋ | hooni | 2013.04.23 | 7120 |