Đầu tiên, tôi tạo một MainViewController. Sau đó, trong MainViewController, tôi làmViewDidAppear không được gọi khi chế độ xem phương thức bị loại bỏ
[self presentViewController:modalViewController animated:YES completion:nil];
modalViewController.modalPresentationStyle = UIModalPresentationFormSheet;
Khi tôi bỏ qua những modalViewController, On iPhone (trừ iPhone 6+), viewDidAppear của MainViewController được gọi. Trên iPad và iPhone 6+, viewDidAppear của MainViewController không được gọi.
Logic được gọi là hàm khi modalViewController bị loại bỏ. Làm thế nào tôi có thể biết khi modalViewController được loại bỏ.
Hãy thử sử dụng một số 'modalPresentationStyle' khác. Nó có hoạt động không? – itsji10dra
Đó là yêu cầu của UX. Tôi không thể thay đổi nó. – Gonghan
Bạn có đang gọi: [super viewDidAppear: animated]; – itsji10dra