1
내보기 컨트롤러에 대해 UINavigationController를 사용합니다. 초기화()에서 또는 viewDidLoad에()는 I 세트 : 본 동안UINavigationBar 시스템 유형 단추가 비활성화되었습니다.
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemEdit
target:self action:@selector(selector)];
또는 뷰 바로 바 버튼을 누르면 (그리고 남아있는 경우)가 비활성화된다. 하지만 사용자 정의 버튼으로 바꾸면 정상적으로 작동합니다.
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
initWithImage:image title:nil
target:self action:@selector(selector)];
나는이 여기 내 다른 질문의 근본 원인을 생각 :
MFMailComposeViewController navigation bar buttons are disabled
사람이 아이디어를 가지고 있습니까? 미리 감사드립니다.
예! 모든 UIBarButtonItemSystemItem 유형 버튼에서 발생합니다. – youshunei
self.editButtonItem은 해결 방법 중 하나이며 (사용자 정의 단추를 사용하여 해결할 수 있음) MFMailComposeViewController가 아직 사용되지 않은 경우에도 사용됩니다. – youshunei