예 네비게이션 바 상단에 취소 버튼과 제목을 모두 추가 할 수 있습니다.
탐색 컨트롤러에보기 컨트롤러를 포함시키고 탐색 컨트롤러에 storyboadId를 제공하십시오. 그런 다음 버튼 액션 사용이
를이 코드
UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc]
initWithTitle:@"Flip"
style:UIBarButtonItemStyleBordered
target:self
action:@selector(cancelButtonAction:)];
self.navigationItem.rightBarButtonItem = flipButton;
self.navigationItem.title = @"Wishlist";
추가) (의 viewDidLoad에서 원하는 클래스에서 당신은 VC
을
UINavigationController *initialNavigationController = (UINavigationController*)[self.storyboard instantiateViewControllerWithIdentifier:@"HomeNavCtrl_id"];
[self presentViewController:initialNavigationController animated:YES completion:nil];
원하는 선물을 취소 할에서 어떤 클래스의 코드를 추가
- (IBAction)cancelBtnAction:(id)sender
{
[self dismissViewControllerAnimated:YES completion:nil];
}
여기에서 직면 한 문제는 무엇입니까? – KKRocks
탐색 모음의 왼쪽에 취소 텍스트를 표시 할 수 없습니다. – Secondwave
취소 버튼을 추가하는 방법은 무엇입니까? – KKRocks