[ios] 상위 ViewController 가져오기
상위 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.
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
-
RSVP 란?
-
[mac] VirtualBox 실행 스크립트와 bash_profile 설정
-
[ppt] 정보보호관리 발표내용 #2
-
[ppt] 정보보호관리 발표내용
-
[ios][swift] 초간단 To-do Memo
-
[mac] Homebrew/rvm/cocoapod setting
-
[ios] Did UIScrollView End Scrolling?
-
[mac] OS X 엘 캐피탄에서 Soudflower 사용하기
-
[ppt] iOS 플라랩#03(2015.04.27) 발표 자료
-
캘리포니아 운전면허 문제
-
[ios] 상위 ViewController 가져오기
-
[svn] Can't convert string from native encoding to 'UTF-8' 메시지가 나오는 경우