Contents

Develop
2015.10.12 14:48

[ios] 상위 ViewController 가져오기

조회 수 1150 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
109 Develop [c] 간단한 순위 루틴.. (정보처리기사) hooni 2003.04.23 6894
108 Develop [c] fgets() 함수 사용하기.. hooni 2003.04.23 7853
107 Develop [c] 싱글, 더블 링크리스트(linked list)로 만든 예제.. file hooni 2003.04.23 6758
106 Develop [c] 컴파일러 선행처리기 따라하기.. file hooni 2003.04.23 6697
105 Develop [c] 구조체/파일 입출력 프로그램 file hooni 2003.04.23 7081
104 Develop [c++] 더블 링크리스트(linked list) 학습용 초간단 단어장 file hooni 2003.04.23 9362
103 Develop [c] OpenGL 직사각형(2D) 크기 확대/축소 hooni 2003.04.23 9084
102 Develop [jsp] 정적/동적(차트생성) 이미지 전달 file hooni 2003.04.23 7328
101 Develop [c] 프로세스간의 통신(파이프) hooni 2003.04.23 6905
100 Develop [c] 구조체의 설명과 예제.. hooni 2003.04.23 8391
99 Develop [c] 포인터와 함수포인터에 대해.. hooni 2003.04.23 8037
98 Develop [c] 스토리지 클래스(변수) hooni 2003.04.23 8214
Board Pagination Prev 1 ... 57 58 59 60 61 62 63 64 65 66 ... 71 Next
/ 71