Contents

Develop
2015.10.12 14:48

[ios] 상위 ViewController 가져오기

조회 수 1157 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
529 Develop 프로그래밍 소스 관련 사이트.. hooni 2013.04.23 16521
528 Develop 프로그램 문서 관리 (Doxygen) hooni 2013.04.23 16434
527 Develop [php] php+db 연동(odbc, mssql, mysql, sybase) 3 hooni 2013.04.23 8565
526 Develop [asp] 폼 메일 소스 file hooni 2013.04.23 7384
525 Develop [asp] 폼메일 예제와 메일 포워딩 프로그램 file hooni 2013.04.23 7154
524 Develop [c] 프로세스 검사하기 hooni 2013.04.23 8040
523 Develop [c] 네트워크 관련 프로그래밍 (포트스캔 탐지 샘플) file hooni 2013.04.23 7211
522 Develop [c] SetTimer() & KillTimer() & 일회용 Timer hooni 2013.04.23 9226
521 Develop [c++] 인라인 함수에 대한 설명 hooni 2013.04.23 7126
520 Develop [c++] 인라인 함수 설명과 예제.. file hooni 2013.04.23 6664
519 Develop [c] 게임 AI FSM 테스트 샘플 소스.. 꽤 괜찮은 소스.. file hooni 2013.04.23 7394
518 Develop [c] 관계형 연산자에 대한 설명 hooni 2013.04.23 7678
Board Pagination Prev 1 ... 22 23 24 25 26 27 28 29 30 31 ... 71 Next
/ 71