Develop
2015.10.23 14:01
[ios] NavigationController 에서 왼쪽(back) 버튼 후킹하기
Views 1306 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 •
-
[ios] Facebook Cache 갱신하는 함수
-
[ios] Facebook SDK 로그인 설명
-
[ios] FlckrFeed Example App (Swift)
-
[ios] iOS 4.0 beta 에서 3.1.3으로 다운그레이드 하는 법
-
[ios] NavigationController 에서 왼쪽(back) 버튼 후킹하기
-
[ios] NSString, RegularExpression Find/Replace
-
[ios] Random Thoughts: Rand() vs. arc4random()
-
[ios] Requesting Location Permissions in iOS
-
[ios] UIAlertView 초간단 샘플 ㅎㅎ
-
[ios] UIView에서 상위 UIViewController 가져오기
-
[ios] UUID 생성 + Key Chain 연동
-
[ios] Xcode에서 특정 파일만 ARC 따로 설정하는 방법