Contents

Develop
2015.10.12 14:48

[ios] 상위 ViewController 가져오기

조회 수 2845 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

상위 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. UIViewimplements 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.
Declared In

UIResponder.h 


?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
783 Develop [android]개발 가이드 및 한글화 문서 file hooni 2013.04.23 48496
782 Develop [api] 인스타그램 API Access_Token 발급 방법 (Instagram API) 3 file hooni 2018.04.05 11048
781 Develop [api] 인스타그램에서 최신 이미지 가져오기 (Using Instagram API) 20 file hooni 2018.04.05 15811
780 Develop [asem] CMOS 패스워드 알아내기.. 소스.. file hooni 2003.04.23 9849
779 Develop [asp] 기본 문법과 제어문 hooni 2013.04.23 8287
778 Develop [asp] 문자열 관련 함수 요약 hooni 2013.04.23 9155
777 Develop [asp] 문자열 넘겨받기 (get,post) hooni 2013.04.23 9818
776 Develop [asp] 폼 메일 소스 file hooni 2013.04.23 8380
775 Develop [asp] 폼메일 예제와 메일 포워딩 프로그램 file hooni 2013.04.23 8027
774 Develop [c#] BFilter 툴바 소스 코드 ㅎㅎ file hooni 2013.04.23 8692
773 Develop [c#] BHO 한샘툴바랑 동현툴바.. secret hooni 2013.04.23 2208
772 Develop [c#] Hashtable <-> Json (dll 포함) file hooni 2013.04.23 84621
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 71 Next
/ 71