Develop
2015.10.12 14:48
[ios] 상위 ViewController 가져오기
Views 1174 Comment 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
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
325 | Develop | [c] OpenGL 시어핀스키 가스킷(p.73 - 첫시간) | hooni | 2003.04.23 | 8796 |
324 | Develop |
[c] 압축 알고리즘 소스 및 정리
![]() |
hooni | 2013.04.23 | 8796 |
323 | Develop |
[c++] 레지스트리 등록 예제
1 ![]() |
hooni | 2013.04.23 | 8831 |
322 | Develop | [c] 함수 요약 (검색해서 쓰세요..) | hooni | 2003.04.23 | 8834 |
321 | Develop |
[c++] mfc 이용한 트레이아이콘(TrayIcon) 클래스 예제 프로젝트
![]() |
hooni | 2013.04.23 | 8834 |
320 | Develop | [c] 지나가는 패킷 잡기 | hooni | 2003.04.23 | 8870 |
319 | Develop | [html] SVG(Scalable Vector Graphics) 간단 정리 | hooni | 2014.02.13 | 8873 |
318 | Develop |
[c++] 윈도우 프로세스뷰어 분석.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 8875 |
317 | Develop | [js] 초간단 암호화/복호화 소스.. | hooni | 2003.04.23 | 8882 |
316 | Develop | [c] 약수/최대공약수/완전수 알고리즘 | hooni | 2003.04.23 | 8904 |
315 | Develop |
[c++] 채팅로봇 소스.. ㅋㄷㅋㄷ
![]() |
hooni | 2013.04.23 | 8906 |
314 | Develop | [js] jQjuery $ 활용 | hooni | 2013.12.17 | 8909 |