Develop
2015.10.23 14:01
[ios] NavigationController 에서 왼쪽(back) 버튼 후킹하기
조회 수 1306 댓글 0
후킹이라기보다 교체? ㅋㄷ
방법이 많음..
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStyleBordered target:self action:@selector(backButtonTapped:)]; self.navigationItem.leftBarButtonItem = backButton;
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(backButtonTapped:)]; self.navigationItem.leftBarButtonItem = backButton;
UIImage *backButtonImage = [UIImage imageNamed:@"back_arrow.png"]; UIButton *leftBarButton = [UIButton buttonWithType:UIButtonTypeCustom]; // Setting the image for the back button [leftBarButton setBackgroundImage:backButtonImage forState:UIControlStateNormal]; [leftBarButton addTarget:self action:@selector(backButtonTapped:) forControlEvents:UIControlEventTouchUpInside]; // setting the frame for the back button leftBarButton.frame = CGRectMake(0, 0, 65, 32); // setting the custom button to navigationbars back button self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftBarButton];
TAG •
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
397 | Develop |
[ios] Locale Identifiers
![]() |
hooni | 2018.11.29 | 1744 |
» | Develop | [ios] NavigationController 에서 왼쪽(back) 버튼 후킹하기 | hooni | 2015.10.23 | 1306 |
395 | Develop |
[ios] None IB vs. StoryBoard 샘플 소스
![]() |
hooni | 2013.09.06 | 17024 |
394 | Develop | [ios] NSData to NSString (NSString to NSData) | hooni | 2015.07.21 | 737 |
393 | Develop | [ios] NSData 클래스에 대해 (NSData <-> char*) | hooni | 2013.04.23 | 26594 |
392 | Develop | [ios] NSMutableString 문자열 패턴 교환 | hooni | 2013.04.23 | 29027 |
391 | Develop | [ios] NSNotificationCenter 초간단 사용 예~ ㅋㄷ | hooni | 2015.06.26 | 761 |
390 | Develop | [ios] NSString URL Encode/Decode (인코딩/디코딩) | hooni | 2014.05.02 | 3499 |
389 | Develop | [ios] NSString 간단한 정규식 사용법 | hooni | 2014.01.28 | 18269 |
388 | Develop | [ios] NSString, RegularExpression Find/Replace | hooni | 2017.04.14 | 962 |
387 | Develop | [ios] Objective-C Types & Storage Capacity | hooni | 2015.07.22 | 1264 |
386 | Develop | [ios] Objective-C 문자열 잘라서 배열(NSArray)에 넣기 | hooni | 2013.04.23 | 29457 |