Develop
2015.10.23 14:01
[ios] NavigationController 에서 왼쪽(back) 버튼 후킹하기
Views 1308 Comment 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 •
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
177 | Develop |
DDay Memo 1.9.4 소스코드
![]() |
hooni | 2015.10.03 | 0 |
176 | Develop | [ios] 최상위 ViewController 가져오기 | hooni | 2015.10.12 | 1206 |
175 | Develop | [ios] 상위 ViewController 가져오기 | hooni | 2015.10.12 | 1174 |
174 | Develop |
[c] 기막힌 정렬 코드 ㅋㄷ
![]() |
hooni | 2015.10.13 | 972 |
173 | Etc |
[eng] 숙제 ㅋㅋㅋ
![]() |
hooni | 2015.10.14 | 1 |
172 | Develop | [linux] CentOS Apache 웹서버에 HTTPS 적용 | hooni | 2015.10.23 | 931 |
171 | Develop | [ios] ViewController Push할 때 애니메이션 효과 | hooni | 2015.10.23 | 1005 |
» | Develop | [ios] NavigationController 에서 왼쪽(back) 버튼 후킹하기 | hooni | 2015.10.23 | 1308 |
169 | Develop | [c] 한글 문자열 출력 | hooni | 2015.11.10 | 1796 |
168 | Develop | [php] 한글 문자열 자르기 (utf-8) | hooni | 2015.11.10 | 1472 |
167 | PPT |
[ppt] OCB기술개발팀 OJT 자료
![]() |
hooni | 2015.11.13 | 1293 |
166 | Develop |
[js] AngularJS 란?
![]() |
hooni | 2015.11.26 | 1040 |