Contents

Develop
2015.10.12 14:48

[ios] 상위 ViewController 가져오기

조회 수 963 댓글 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 


?

  1. [js] 자바스크립트 이벤트 핸들..

  2. [js] 자바스크립트 메뉴얼 사이트.. ㅋㅋ

  3. [js] 자바스크립트 escape()를 PHP로 받기

  4. [js] 인터넷 주소(URL) 인코딩 ㅋㅋ

  5. [js] 이벤트 핸들러(Event Handlers)

  6. [js] 이벤트 전파 3단계

  7. [js] 이미지 사이즈를 동적으로 조절..

  8. [js] 이미지 미리 로딩하기

  9. [js] 윤동이가 만든 영어 학습(?) 프로그램

  10. [js] 윈도우 시작버튼처럼 나오는 메뉴

  11. [js] 웹페이지에서 특정 엘리먼트 드래그, 복사, 컨텍스트메뉴, 키보드 막기

  12. [js] 여러가지 트리(tree) 모음.. ㅋㅋ

Board Pagination Prev 1 ... 32 33 34 35 36 37 38 39 40 41 ... 98 Next
/ 98