Develop
2015.10.12 14:48
[ios] 상위 ViewController 가져오기
조회 수 1161 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
529 | Develop |
[ios] Objective-C에서 형식이 있는 문자열(Format Strings)에 사용할 수 있는 토큰들(Tokens)
![]() |
hooni | 2013.04.23 | 18830 |
528 | Develop | [ios] Objective-C 문자열 조작 메서드 | hooni | 2013.04.23 | 26495 |
527 | Develop | [android] [번역] 안드로이드 Android Cloud to Device Messaging(C2DM) | hooni | 2013.04.23 | 20479 |
526 | Develop |
[android] 자동차 리모컨 소스코드
![]() |
hooni | 2013.04.23 | 17082 |
525 | Develop | [js] 간단한 게임 프로토타입 (HTML5 와는 무관) | hooni | 2013.04.23 | 15184 |
524 | Develop | [js] 수학 공식을 제공하는 Math 객체 | hooni | 2013.04.23 | 15435 |
523 | Develop | [ios] 참고할만한 좋은 예제 소스.. | hooni | 2013.04.23 | 27407 |
522 | Develop | [ios] 코코아 프레임워크(Cocoa Framework) 기본적인 내용~ | hooni | 2013.04.23 | 27720 |
521 | Develop | [java] Interface 와 abstract | hooni | 2013.04.23 | 8725 |
520 | Develop | [spring] 스프링 IoC/DI | hooni | 2013.04.23 | 11404 |
519 | Develop | [C#] MD5, SHA1 해시 & 인코딩 | hooni | 2013.04.23 | 77951 |
518 | Develop |
[c#] 웹문서 소스(html) 긁어오기
![]() |
hooni | 2013.04.23 | 24563 |