Contents

Develop
2015.10.12 14:48

[ios] 상위 ViewController 가져오기

조회 수 960 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
85 Develop [php] 정규표현식 간단히 정리 hooni 2013.04.23 6455
84 Develop [php] 초간단 게시판 페이지 분할 알고리즘 hooni 2003.04.23 8699
83 Develop [php] 초간단 웹 카운터.. file hooni 2003.04.23 7063
82 Develop [php] 탐색기와 같은 다이나믹 트리(xml/xsl 이용) file hooni 2013.04.23 7154
81 Develop [php] 피코맥스용 검색엔진 ㅋㅋ file hooni 2013.04.23 6781
80 Develop [php] 하루 전 날짜 쉽게 구하기. hooni 2013.12.25 12215
79 Develop [php] 한글 문자열 자르기 (utf-8) hooni 2015.11.10 1324
78 Develop [php] 한샘 전자발주 시스템.. file hooni 2013.04.23 11987
77 Develop [php] 현재에서 일정한 날짜 더하기.. hooni 2013.04.23 7114
76 Develop [php][laravel] 라라벨 개발환경 세팅하기 (Mac, Window) 2 file hooni 2017.12.15 2593
75 Develop [php][laravel] 라라벨 프로젝트 생성 및 구조 file hooni 2017.12.15 2389
74 Develop [php][laravel] 초간단 MacOS에서 Laravel 개발 환경 구축 hooni 2017.12.15 1886
Board Pagination Prev 1 ... 59 60 61 62 63 64 65 66 67 68 ... 71 Next
/ 71