"완료"버튼이있는 내비게이션 컨트롤러가 있습니다. 사용자가 양식을 마치면 "완료"를 누르면 해당보기가 스택에서 튀어 나오고 주 메뉴에서 다시 표시됩니다.UIBarButtonItem - "완료"버튼을 어떻게 만듭니 까?
UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"Done"
style:UIBarButtonItemStylePlain
target:self
action:[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:1] animated:YES]];
self.navigationItem.rightBarButtonItem = anotherButton;
이 도와주세요 :
여기에 지금까지 가지고 코드입니다!
UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"Done"
style:UIBarButtonItemStylePlain
target:self
action:@selector(onClickOfDone);
self.navigationItem.rightBarButtonItem = anotherButton;
당신의 팝업이 하나의 레벨은 다시 위의 코드의 경우 이제 onClickOfDone
- (void)onClickOfDone {
[self.navigationController popViewControllerAnimated:YES];
}
라는 이름의 방법에 popViewController 로직을 작성 :이 시도에 대해 어떻게 당신에게
고마워요! 나는 그 기억 방출을 너무 놓쳤다. – jbearden
감사합니다 .Nekto ... 그 사람이 나를 도왔습니다! –