2017-12-29 34 views
0

탐색 바를 프로그래밍 방식으로 설정 한보기를 입력하는 경우를 제외하고 앱의 탐색 바에 모든 기능이 포함되어 있습니다 (세그미터에서 설정, 재설정 기능).네비게이션 바 오류

괜찮은 사용자 지정 탐색 모음이 표시되지만 사용자 지정 뒤로 단추를 구현하면 전체 응용 프로그램에 문제가있는 탐색 모음과 동일한 탐색 모음이 표시됩니다 (이제는 재설정 및 설정 단추가 모든 곳에서 표시됨).

특정보기에만 탐색 모음을 맞춤 설정하는 방법이 있습니까? 코드의

부 :

self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default) 
    self.navigationController?.navigationBar.shadowImage = UIImage() 

    //Add gesture to MainLabel 
    let tapLabel: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(resetTime)) 
    tapLabel.delegate = self 
    mainLabel.isUserInteractionEnabled = true 
    mainLabel.addGestureRecognizer(tapLabel) 

    //Add gesture to UINavigationBar title 
    let tapTitle: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(resetTime)) 
    tapTitle.delegate = self 
    self.navigationItem.titleView = resetLabel 
    self.navigationItem.titleView?.isUserInteractionEnabled = true 
    self.navigationItem.titleView?.addGestureRecognizer(tapTitle) 
} 

답변

0

예, 당신은 당신이 사용자 정의 탐색 모음을하고자하는의 ViewController의 viewDidDisappear에 당신이 필요 viewDidAppear 숨기기 취소 버튼에서 탐색 버튼을 숨길 수 있습니다.