Contents

Develop
2015.10.12 14:48

[ios] 상위 ViewController 가져오기

Views 1173 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
129 Develop [ios] FlckrFeed Example App (Swift) file hooni 2016.11.27 1214
128 Develop [android] 버전 별 앱 알림 설정으로 이동하는 방법 file hooni 2016.11.28 2293
127 Etc 웹 보안 논문 주제 2016 secret hooni 2016.11.28 0
126 PPT [ppt] 정보보호관리 발표내용 file hooni 2016.11.30 1210
125 Etc ISMS 인증기준 – 정보보호대책 (시스템개발보안) file hooni 2016.12.01 1506
124 PPT [ppt] 정보보호관리 발표내용 #2 file hooni 2016.12.08 1216
123 Develop XML, JSON, BSON, MSGPACK 장,단점 비교 file hooni 2017.01.11 2385
122 Develop [ios] 동영상 플레이어 샘플 (for Local File) file hooni 2017.02.07 1214
121 Develop [ios] 동영상 플레이어 샘플 (for Remote Url) file hooni 2017.02.07 1770
120 System/OS Enable the Develop Menu in Safari file hooni 2017.02.07 1342
119 System/OS Enable Safari Hidden Debug Menu in Mac OS X file hooni 2017.02.07 1740
118 System/OS [android] 초간단 HTTP, POST 전송 샘플 1 file hooni 2017.02.16 3659
Board Pagination Prev 1 ... 83 84 85 86 87 88 89 90 91 92 ... 98 Next
/ 98