컨트롤러와 함께 두 개의 뷰가 있습니다. 응용 프로그램은 FirstViewController
으로 시작합니다. 그런 다음 버튼을 사용하여 SecondViewController
을 엽니 다.ViewController로 돌아갈 때 식별
다른 버튼을 사용하여 SecondViewController
을 닫고 FirstViewController
으로 돌아갑니다.
FirstViewController
에서 포커스를 복구했는지 감지 할 수있는 방법이 있습니까?
편집 : 확인 답변을 찾고 viewWillAppear
을 사용하지만 UIModalPresentationFormSheet
을 사용하면 작동하지 않습니다.
-(IBAction)openSecondView{
SecondViewController *screen = [[SecondViewController alloc] initWithNibName:nil bundle:nil];
screen.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
screen.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:screen animated:YES];
[screen release];
}
닫기 버튼으로이보기를 닫습니다.
viewWillAppear
나는 그것을 사용했지만 작동하지 않았습니다. 추가 정보로 질문을 편집했습니다. . 고맙습니다. – JSanchez