Develop
2015.10.23 14:01
[ios] NavigationController 에서 왼쪽(back) 버튼 후킹하기
조회 수 1300 댓글 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 •
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
757 | Develop | [js] 키보드 아스키코드(ASCII) 코드보기 | hooni | 2003.04.23 | 32508 |
756 | Develop | [js] 이벤트 핸들러(Event Handlers) | hooni | 2003.04.23 | 6757 |
755 | Develop | [js] 사라지는 브라우저 | hooni | 2003.04.23 | 6879 |
754 | Develop | [c] OpenGL 마우스 이벤트 | hooni | 2003.04.23 | 8754 |
753 | Develop | [js] 점점 커지는 새창.. | hooni | 2003.04.23 | 7023 |
752 | Develop | [c][java] 소켓 프로그래밍(채팅 서버 C, 클라이언트 Java) | hooni | 2003.04.23 | 7030 |
751 | Develop | [c] 신기한 atoi함수(www.game79.net) | hooni | 2003.04.23 | 7291 |
750 | Develop | [c] OpenGL 색 입방체의 회전(입체) | hooni | 2003.04.23 | 7897 |
749 | Develop | [php] 마시마로 캐릭터 방명록 | hooni | 2003.04.23 | 8272 |
748 | Develop | [c] 시간 계산 하는 프로그램 소스코드 | hooni | 2003.04.23 | 6776 |
747 | Develop | [linux] 프로세스 관련 시스템콜 | hooni | 2003.04.23 | 7875 |
746 | Develop | [c] 문자열 처리 관련 함수들 설명 | hooni | 2003.04.23 | 8015 |