Develop
2015.10.12 14:48
[ios] 상위 ViewController 가져오기
Views 1173 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 |
---|---|---|---|---|---|
177 | System/OS |
How to Install and Use wget on Mac
![]() |
hooni | 2020.09.03 | 1552 |
176 | System/OS |
SSH Passwordless Login Using SSH Keygen in 5 Easy Steps
![]() |
hooni | 2019.11.22 | 1549 |
175 | Etc |
아이폰의 터치스크린 정확도
![]() |
hooni | 2015.04.01 | 1531 |
174 | Etc |
원어민이 매일 쓰는 일상표현 150개
![]() |
hooni | 2023.09.17 | 1526 |
173 | System/OS |
RPA란? 어디에 어떻게 쓰이고 누가 만드나?
![]() |
hooni | 2020.01.28 | 1526 |
172 | Develop | [ios] Swift 4 String, Date, DateFormatter 예제 | hooni | 2018.10.18 | 1520 |
171 | Etc |
모바일 프로그래머가 갖추어야 할 필수 역량
![]() |
hooni | 2017.02.16 | 1516 |
170 | System/OS |
Configure Postfix to Use Gmail SMTP on Ubuntu 18.04
![]() |
hooni | 2020.02.07 | 1509 |
169 | Etc |
ISMS 인증기준 – 정보보호대책 (시스템개발보안)
![]() |
hooni | 2016.12.01 | 1506 |
168 | Develop |
macOS에 node, npm 설치하기 (homebrew)
![]() |
hooni | 2021.11.06 | 1481 |
167 | System/OS |
[mac] Mac OS 패키지 매니저, HomeBrew
![]() |
hooni | 2015.01.03 | 1480 |
166 | Develop | [android] 간단한 SQLIite 예제 | hooni | 2017.06.14 | 1478 |