Develop
2015.10.12 14:48
[ios] 상위 ViewController 가져오기
조회 수 949 댓글 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 | Develop | [c++] p.58 연습문제 2번 | hooni | 2003.04.23 | 16296 |
1016 | Develop | [c++] RSA Sample 4 CPP | hooni | 2013.04.23 | 9181 |
1015 | Develop | [c++] SetWindowPos함수를 이용한 크기조절 예제 1 | hooni | 2013.04.23 | 11075 |
1014 | Develop | [c++] String Tokenizer (나중에 c 코드로 변경해서 사용할 것) | hooni | 2013.04.23 | 11690 |
1013 | Develop | [c++] template 사용예 | hooni | 2003.04.23 | 7147 |
1012 | Develop | [c++] Win32 API 기본 출력인 MessageBox() 함수 사용 예제.. | hooni | 2013.04.23 | 12625 |
1011 | Develop | [c++] Win32API를 이용한 ExitWindowsEx 사용한 예제코드 | hooni | 2013.04.23 | 7952 |
1010 | Develop | [c++] Window API(MFC) 오목 게임 | hooni | 2003.04.23 | 10275 |
1009 | Develop | [c++] WinSock2.0 채팅 프로그램 ㅋㅋ | hooni | 2013.04.23 | 8521 |
1008 | Develop | [c++] winsock을 이용한 서버,클라이언트와 ssl서버,클라이언트 | hooni | 2013.04.23 | 7606 |
1007 | Develop | [c++] 가짜 인증서(하나은행) 프로그램 | hooni | 2013.04.23 | 10750 |
1006 | Develop | [c++] 기초강좌 #01(입출력,영역지정) | hooni | 2003.04.23 | 11402 |