Develop
2015.10.12 14:48
[ios] 상위 ViewController 가져오기
조회 수 982 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
597 | Develop | [c][cpp] mfc, win32api, 예제 소스 대박 모음~ | hooni | 2013.04.23 | 8470 |
596 | Develop | [c] 쓰레드에 대한 내용 퍼오기..ㅡㅡ; | hooni | 2013.04.23 | 8441 |
595 | Develop | [c] CGI Library to C^^ | hooni | 2003.04.23 | 8425 |
594 | Develop | [c] 파이프(popen)로 다른 프로세스 실행결과 가져오기 | hooni | 2013.04.23 | 8402 |
593 | Develop | [js] 자바스크립트로 만든 게임 | hooni | 2013.04.23 | 8389 |
592 | Develop | 다양한 방법으로 아주 큰 수(Big Number) 계산.. ㅋㅋ | hooni | 2013.04.23 | 8381 |
591 | Develop | [c] 패킷 유량/프로토콜 통계 모니터링.. | hooni | 2013.04.23 | 8380 |
590 | Develop | [c] 구조체의 설명과 예제.. | hooni | 2003.04.23 | 8375 |
589 | Develop | [java] 채팅 프로그램.. swing 사용.. | hooni | 2013.04.23 | 8352 |
588 | Develop | [c] 암호 알고리즘 소스.. | hooni | 2013.04.23 | 8343 |
587 | Develop | [js] selectbox 선택 후 input 박스에 적용 | hooni | 2013.04.23 | 8336 |
586 | Develop | [c] 콘솔에서 패스워드 입력시 문자 보이지 않게 하는 코드 | hooni | 2013.04.23 | 8334 |