Contents

Develop
2015.10.12 14:48

[ios] 상위 ViewController 가져오기

조회 수 1163 댓글 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. [ppt] iOS 플라랩#03(2015.04.27) 발표 자료

    Date2015.04.24 CategoryPPT Byhooni Views1166
    Read More
  2. [mac] OS X 엘 캐피탄에서 Soudflower 사용하기

    Date2016.10.03 CategorySystem/OS Byhooni Views1167
    Read More
  3. [ios] Did UIScrollView End Scrolling?

    Date2016.04.19 CategoryDevelop Byhooni Views1169
    Read More
  4. [mac] Homebrew/rvm/cocoapod setting

    Date2017.07.29 CategorySystem/OS Byhooni Views1171
    Read More
  5. [ios][swift] 초간단 To-do Memo

    Date2016.06.27 CategoryDevelop Byhooni Views1180
    Read More
  6. [ppt] 정보보호관리 발표내용

    Date2016.11.30 CategoryPPT Byhooni Views1185
    Read More
  7. [mac] VirtualBox 실행 스크립트와 bash_profile 설정

    Date2020.07.08 CategorySystem/OS Byhooni Views1185
    Read More
  8. [ppt] 정보보호관리 발표내용 #2

    Date2016.12.08 CategoryPPT Byhooni Views1186
    Read More
  9. RSVP 란?

    Date2017.11.22 CategoryEtc Byhooni Views1191
    Read More
  10. [ios] 동영상 플레이어 샘플 (for Local File)

    Date2017.02.07 CategoryDevelop Byhooni Views1195
    Read More
  11. [ios] 최상위 ViewController 가져오기

    Date2015.10.12 CategoryDevelop Byhooni Views1196
    Read More
  12. [ios] FlckrFeed Example App (Swift)

    Date2016.11.27 CategoryDevelop Byhooni Views1198
    Read More
Board Pagination Prev 1 ... 6 7 8 9 10 11 12 13 14 15 ... 98 Next
/ 98