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 |
---|---|---|---|---|---|
325 | Develop |
[android] 만화 어플 소스코드
![]() |
hooni | 2013.04.23 | 92926 |
324 | Develop |
[c#] 웹문서 소스(html) 긁어오기
![]() |
hooni | 2013.04.23 | 24580 |
323 | Develop | [C#] MD5, SHA1 해시 & 인코딩 | hooni | 2013.04.23 | 77974 |
322 | Develop | [spring] 스프링 IoC/DI | hooni | 2013.04.23 | 11413 |
321 | Develop | [java] Interface 와 abstract | hooni | 2013.04.23 | 8734 |
320 | Develop | [ios] 코코아 프레임워크(Cocoa Framework) 기본적인 내용~ | hooni | 2013.04.23 | 27727 |
319 | Develop | [ios] 참고할만한 좋은 예제 소스.. | hooni | 2013.04.23 | 27409 |
318 | Develop | [js] 수학 공식을 제공하는 Math 객체 | hooni | 2013.04.23 | 15441 |
317 | Develop | [js] 간단한 게임 프로토타입 (HTML5 와는 무관) | hooni | 2013.04.23 | 15191 |
316 | Develop |
[android] 자동차 리모컨 소스코드
![]() |
hooni | 2013.04.23 | 17082 |
315 | Develop | [android] [번역] 안드로이드 Android Cloud to Device Messaging(C2DM) | hooni | 2013.04.23 | 20492 |
314 | Develop | [ios] Objective-C 문자열 조작 메서드 | hooni | 2013.04.23 | 26510 |