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 |
---|---|---|---|---|---|
529 | Develop |
[c] 암호 알고리즘 소스..
![]() |
hooni | 2013.04.23 | 8354 |
528 | Develop |
[c] 암호화 알고리즘 DES 구현 ㅋㅋ
![]() |
hooni | 2013.04.23 | 7453 |
527 | Develop |
[c] 압축 알고리즘 소스 및 정리
![]() |
hooni | 2013.04.23 | 8796 |
526 | Develop | [c] 약수/최대공약수/완전수 알고리즘 | hooni | 2003.04.23 | 8904 |
525 | Develop | [c] 연산자 우선순위.. ㅋㅋ | hooni | 2013.04.23 | 7196 |
524 | Develop | [c] 오류체크(CRC 체크 ) 소스 2 | hooni | 2013.04.23 | 8157 |
523 | Develop |
[c] 오목.. 간단한 소스 ㅋㅋ
![]() |
hooni | 2013.04.23 | 9674 |
522 | Develop |
[c] 웅지학원 NAT를 소스코드로..
![]() |
hooni | 2013.04.23 | 6629 |
521 | Develop |
[c] 웹 메모장.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 6851 |
520 | Develop |
[c] 윈도우 API sin 함수 출력..
![]() |
hooni | 2013.04.23 | 15690 |
519 | Develop |
[c] 윈도우 API Viewport와 Window
![]() |
hooni | 2013.04.23 | 5984 |
518 | Develop |
[c] 유닉스 프로그램에서 인수처리 해주는 getopt() 함수
![]() |
hooni | 2013.04.23 | 8095 |