Develop
2015.10.12 14:48
[ios] 상위 ViewController 가져오기
조회 수 945 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
781 | Develop | [c] 가위 바위 보 서버, 클라이언트 소스코드 | hooni | 2003.04.23 | 8163 |
780 | Develop | [c] fork() 시스템 콜 사용 방법. | hooni | 2003.04.23 | 27575 |
779 | Develop | [c] 소켓 프로그래밍 요약.. | hooni | 2003.04.23 | 6956 |
778 | Develop | [c] 소켓주소 구조체에 대해.. | hooni | 2003.04.23 | 6716 |
777 | Develop | [c] 소켓의 세가지 동작모드 | hooni | 2003.04.23 | 6896 |
776 | Develop | [c] 컴파일러 DFA구현^^ 입력 받아 실행 4 | hooni | 2003.04.23 | 8097 |
775 | Develop | [c] OpenGL 시어핀스키 가스킷(p.73 - 첫시간) | hooni | 2003.04.23 | 8740 |
774 | Develop | [c] 시어핀스키 가스킷..(p.582, A.2 - 두번째) | hooni | 2003.04.23 | 7466 |
773 | Develop | [c] 약수/최대공약수/완전수 알고리즘 | hooni | 2003.04.23 | 8855 |
772 | Develop | [c] 프로그래밍의 전반적인 설명 ppt | hooni | 2003.04.23 | 7661 |
771 | Develop | [jsp] HelloServlet 출력문 | hooni | 2003.04.23 | 7782 |
770 | Develop | [jsp] Get방식, Post방식 전송 예제.. | hooni | 2003.04.23 | 13749 |