Develop
2015.10.12 14:48
[ios] 상위 ViewController 가져오기
Views 1171 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 | 8353 |
528 | Develop | [c] 암호화 알고리즘 DES 구현 ㅋㅋ | hooni | 2013.04.23 | 7452 |
527 | Develop | [c] 압축 알고리즘 소스 및 정리 | hooni | 2013.04.23 | 8794 |
526 | Develop | [c] 약수/최대공약수/완전수 알고리즘 | hooni | 2003.04.23 | 8899 |
525 | Develop | [c] 연산자 우선순위.. ㅋㅋ | hooni | 2013.04.23 | 7192 |
524 | Develop | [c] 오류체크(CRC 체크 ) 소스 2 | hooni | 2013.04.23 | 8153 |
523 | Develop | [c] 오목.. 간단한 소스 ㅋㅋ | hooni | 2013.04.23 | 9672 |
522 | Develop | [c] 웅지학원 NAT를 소스코드로.. | hooni | 2013.04.23 | 6625 |
521 | Develop | [c] 웹 메모장.. ㅋㅋ | hooni | 2013.04.23 | 6849 |
520 | Develop | [c] 윈도우 API sin 함수 출력.. | hooni | 2013.04.23 | 15686 |
519 | Develop | [c] 윈도우 API Viewport와 Window | hooni | 2013.04.23 | 5982 |
518 | Develop | [c] 유닉스 프로그램에서 인수처리 해주는 getopt() 함수 | hooni | 2013.04.23 | 8092 |