Develop
2015.10.12 14:48
[ios] 상위 ViewController 가져오기
조회 수 955 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
1005 | Develop | [opengl] 컴퓨터 그래픽스 강의 자료(수업자료) | hooni | 2003.04.23 | 20432 |
1004 | Develop | [android] [번역] 안드로이드 Android Cloud to Device Messaging(C2DM) | hooni | 2013.04.23 | 20421 |
1003 | Develop | [php] substr() 한글 자를 때 깨짐 방지 | hooni | 2014.01.09 | 20363 |
1002 | System/OS | [linux] 꿀통(honeyd) 설치하기.. 메뉴얼 과정 6 | hooni | 2006.04.23 | 20219 |
1001 | Develop | [ios] UIView에서 상위 UIViewController 가져오기 | hooni | 2013.09.27 | 20155 |
1000 | Develop | [c] UTF-8을 EUC-KR로 변환.. (iconv) | hooni | 2013.04.23 | 20129 |
999 | Develop | [c] AES 알고리즘 (암호화/복호화) | hooni | 2003.04.23 | 20047 |
998 | System/OS | [windows] 여러가지 활용 팁 | hooni | 2003.04.23 | 19971 |
997 | Etc | 양성/음성 오류에 대한 개념 | hooni | 2013.04.23 | 19851 |
996 | Etc | [web] 제로보드 XE 템플릿에서 if문에 대해서 알아봅시다 | hooni | 2013.08.16 | 19807 |
995 | Etc | [세미나] XML 레포트.. | hooni | 2003.04.23 | 19702 |
994 | Develop | [php] XE 에서 php 구문 사용하기 (XE 템플릿에서) | hooni | 2013.10.31 | 19443 |