Develop
2015.10.12 14:48
[ios] 상위 ViewController 가져오기
조회 수 1167 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
1089 | Develop |
[ios] iOS 8 개발자가 우선 알아야 할 3가지
![]() |
hooni | 2014.10.02 | 980 |
1088 | PPT |
[ppt] iOS 플라랩#02(2015.03.19) 발표 자료
![]() |
hooni | 2015.04.24 | 981 |
1087 | Develop | [android] AlertDialog 메시지 창 띄우기 | hooni | 2015.07.09 | 981 |
1086 | Develop |
[ios] APNS에 사용할 인증서 만들기 (KeyChain에 있는 인증서 Export)
![]() |
hooni | 2015.01.03 | 984 |
1085 | Develop | [kotlin] 코틀린 안드로이드 앱 버전/빌드 정보 | hooni | 2020.12.15 | 985 |
1084 | Etc | 수리통계학 : 표본공간과 사상-1 | hooni | 2015.04.20 | 989 |
1083 | Develop | [js] 좋은 강연자료 & UI 자료 | hooni | 2014.10.06 | 990 |
1082 | System/OS | 개인적으로 쓰고 있는 bash_profile | hooni | 2015.01.16 | 990 |
1081 | System/OS | [linux] The Ultimate Wget Download Guide With 15 Awesome Examples | hooni | 2020.05.26 | 990 |
1080 | Develop | [ios] ViewController Push할 때 애니메이션 효과 | hooni | 2015.10.23 | 994 |
1079 | PPT |
[ppt] Equation Solving 발표 자료 (@AjaxUI랩 밋업데이 2012.02.28)
![]() |
hooni | 2015.07.22 | 999 |
1078 | System/OS | 개인적으로 쓰고 있는 zshrc 파일 | hooni | 2022.02.25 | 1004 |