Contents

Develop
2015.10.12 14:48

[ios] 상위 ViewController 가져오기

조회 수 930 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
1017 Develop [ios] 기본 네비게이션바의 타이틀, back버튼 위치와 속성 변경 file hooni 2016.05.16 2062
1016 Develop [ios] UUID 생성 + Key Chain 연동 file hooni 2016.05.13 4622
1015 Develop [c#] 전자금융보안론 발표/설치 자료(툴바 소스코드) secret hooni 2016.05.07 0
1014 PPT [ppt] 전자금융보안론 발표/설치 자료 file hooni 2016.05.03 1264
1013 Develop XE Core 1.8.18 본문 작성시 태그(html) 사라지는 버그 file hooni 2016.04.21 841
1012 Develop [io] Apple Watch, Today Extension 앱ID 설정 hooni 2016.04.20 769
1011 Develop [ios] Did UIScrollView End Scrolling? hooni 2016.04.19 994
1010 Develop [ios] How To Use UIScrollView to Scroll and Zoom Content (Using Swift) file hooni 2016.03.23 7202
1009 Develop [ios] How To Use UIScrollView to Scroll and Zoom Content (Using Objective-C) file hooni 2016.03.23 1568
1008 Develop [js] AngularJS 란? file hooni 2015.11.26 861
1007 PPT [ppt] OCB기술개발팀 OJT 자료 file hooni 2015.11.13 1118
1006 Develop [php] 한글 문자열 자르기 (utf-8) hooni 2015.11.10 1294
Board Pagination Prev 1 ... 9 10 11 12 13 14 15 16 17 18 ... 98 Next
/ 98