Develop
2015.10.12 14:48

[ios] 상위 ViewController 가져오기

Views 951 Votes 0 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

상위 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
No. Category Subject Author Date Views
713 Develop [ios] 설정에서 푸시 알림(APNS) on/off 상태 확인 hooni 2015.04.28 2044
712 Develop [ios] GPS 이용 상태 확인 hooni 2015.04.27 1293
711 Develop [js] jQuery, Javascript 모바일(스마트폰) 판단하는 방법 hooni 2015.04.26 2449
710 Develop [js] e.stopPropagation() VS e.preventDefault () file hooni 2015.04.14 808
709 Develop [js] 모바일 스크롤 방지(해제) hooni 2015.04.14 1588
708 Develop [js] 스크롤 이벤트 막기 hooni 2015.04.14 1007
707 Develop [ios] 앱에서 설정화면 호출하기 hooni 2015.04.07 743
706 Develop [ios] GMT Date와 Local Date 변환하기 hooni 2015.04.07 825
705 Develop [ios] 아이폰 앱 이름 및 버전 정보 hooni 2015.03.24 844
704 Develop [ios] 카메라 사용 권한 확인해서 분기하는 방법 hooni 2015.02.26 1867
703 Develop [ios] Touch ID 적용 샘플 코드 (예제) file hooni 2015.02.23 663
702 Develop [펌] 게임 엔진 만든거 공개합니다. hooni 2015.02.21 2350
701 Develop [ios] StoryBoard(xib) 없이 프로젝트 만들기 file hooni 2015.02.12 1063
700 Develop [ios] UIWebView에서 로컬에 있는 html 파일 불러오기 hooni 2015.02.10 889
699 Develop [ios] 로컬에 있는 JS 파일 웹뷰에서 동적으로 실행하기 hooni 2015.02.10 947
698 Develop [ios] 로컬에 있는 html 실행하기 hooni 2015.02.10 1026
Board Pagination Prev 1 ... 7 8 9 10 11 ... 53 Next
/ 53