조회 수 20230 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

UIView에서 상위에 있는 UIViewController 찾아오기


// 상위 뷰 중에 원하는 뷰컨트롤러 얻어오는 거임.
- (UIViewController*)getHomeViewController {
    for (UIView* next = [self.view superview]; next; next = next.superview) {
        UIResponder* nextResponder = [next nextResponder];
        if ([nextResponder isKindOfClass:[HoppinHomeViewController class]]) {
            return (UIViewController*)nextResponder;
        }
    }
    return nil;
}

?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
45 Develop [c] Mac OS 에 gmp(gmp.h) 라이브러리 설치 hooni 2016.10.03 1437
44 Develop [c] 메시지큐(Message Queue) 설명.. (joinc) hooni 2013.04.23 14298
43 Develop [c] 프로세스 검사하기 hooni 2013.04.23 8046
42 Develop [ios] Did UIScrollView End Scrolling? hooni 2016.04.19 1169
41 Develop [ios] Facebook Cache 갱신하는 함수 file hooni 2017.02.27 1318
40 Develop [ios] Facebook SDK 로그인 설명 file hooni 2017.04.19 1318
39 Develop [ios] FlckrFeed Example App (Swift) file hooni 2016.11.27 1198
38 Develop [ios] iOS 4.0 beta 에서 3.1.3으로 다운그레이드 하는 법 file hooni 2013.04.23 37540
37 Develop [ios] NavigationController 에서 왼쪽(back) 버튼 후킹하기 hooni 2015.10.23 1295
36 Develop [ios] NSString, RegularExpression Find/Replace hooni 2017.04.14 945
35 Develop [ios] Random Thoughts: Rand() vs. arc4random() hooni 2013.10.31 68115
34 Develop [ios] Requesting Location Permissions in iOS file hooni 2018.08.18 1727
33 Develop [ios] UIAlertView 초간단 샘플 ㅎㅎ hooni 2013.10.14 46187
» Develop [ios] UIView에서 상위 UIViewController 가져오기 hooni 2013.09.27 20230
31 Develop [ios] UUID 생성 + Key Chain 연동 file hooni 2016.05.13 4778
30 Develop [ios] Xcode에서 특정 파일만 ARC 따로 설정하는 방법 file hooni 2017.03.29 1079
Board Pagination Prev 1 2 3 4 Next
/ 4