Develop
2015.10.12 14:48
[ios] 상위 ViewController 가져오기
조회 수 962 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
325 | Develop | [c] 이진 탐색 두 가지 코드 (재귀/반복) | hooni | 2015.06.26 | 842 |
324 | Develop | [c] 유닉스 프로그램에서 인수처리 해주는 getopt() 함수 | hooni | 2013.04.23 | 8075 |
323 | Develop | [c] 윈도우 API Viewport와 Window | hooni | 2013.04.23 | 5961 |
322 | Develop | [c] 윈도우 API sin 함수 출력.. | hooni | 2013.04.23 | 15675 |
321 | Develop | [c] 웹 메모장.. ㅋㅋ | hooni | 2013.04.23 | 6827 |
320 | Develop | [c] 웅지학원 NAT를 소스코드로.. | hooni | 2013.04.23 | 6611 |
319 | Develop | [c] 오목.. 간단한 소스 ㅋㅋ | hooni | 2013.04.23 | 9658 |
318 | Develop | [c] 오류체크(CRC 체크 ) 소스 2 | hooni | 2013.04.23 | 8123 |
317 | Develop | [c] 연산자 우선순위.. ㅋㅋ | hooni | 2013.04.23 | 7185 |
316 | Develop | [c] 약수/최대공약수/완전수 알고리즘 | hooni | 2003.04.23 | 8871 |
315 | Develop | [c] 압축 알고리즘 소스 및 정리 | hooni | 2013.04.23 | 8782 |
314 | Develop | [c] 암호화 알고리즘 DES 구현 ㅋㅋ | hooni | 2013.04.23 | 7433 |