Develop
2015.10.12 14:48
[ios] 상위 ViewController 가져오기
조회 수 1173 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
129 | Develop | [c#] 웹문서 소스(html) 긁어오기 | hooni | 2013.04.23 | 24578 |
128 | Etc | 엑셀 함수 총 정리 ㅎㅎ | hooni | 2013.06.05 | 24633 |
127 | PPT | [ppt] Equation Solving 발표 자료 (@PWE랩 톡데이 2011.07.26) | hooni | 2013.04.23 | 24735 |
126 | Etc | 스마트폰 보안 해외 발생 사례~ | hooni | 2013.04.23 | 25016 |
125 | Develop | GCM 사용하기 3 (JSP로 GCM 푸시 서버 만들기) 4 | hooni | 2013.07.06 | 25430 |
124 | System/OS | [windows] 최근 열어본 문서목록 안나오게 하는 방법 | hooni | 2013.04.23 | 25575 |
123 | Develop | [ios] 구분자로 문자열 자르기 (split) | hooni | 2013.04.23 | 26324 |
122 | Develop | [node.js] nodejs 기본 설치 | hooni | 2013.04.23 | 26328 |
121 | Develop | [js] 모바일웹에서 이미지 저장하는거 (context menu) 막기 | hooni | 2013.04.23 | 26429 |
120 | Develop | [ios] Objective-C 문자열 조작 메서드 | hooni | 2013.04.23 | 26509 |
119 | Develop | [android] 단일 Thread 환경의 안드로이드에서 Handler를 사용 | hooni | 2013.04.23 | 26579 |
118 | Develop | [ios] NSData 클래스에 대해 (NSData <-> char*) | hooni | 2013.04.23 | 26594 |