Sử dụng sau:Actionsheet truns nền popover sang màu đen trước popover bị đuổi khỏi sân trong ios 9
[self.actionSheetPostOptions showFromBarButtonItem:self.navigationItem.rightBarButtonItem animated:YES];
cũng đã cố gắng
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil
message:nil
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *actnCamera = [UIAlertAction actionWithTitle:@"Camera" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
}];
UIAlertAction *actnLibrary = [UIAlertAction actionWithTitle:@"Library" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
}];
[alertController addAction:actnLibrary];
[alertController addAction:actnCamera];
[alertController setModalPresentationStyle:UIModalPresentationPopover];
UIPopoverPresentationController *popPresenter = [alertController
popoverPresentationController];
popPresenter.barButtonItem = self.navigationItem.rightBarButtonItem;
[self presentViewController:alertController animated:YES completion:nil];
nhưng vẫn nhận được cùng một vấn đề trong khi bác bỏ.
Cập nhật iOS 11: Vấn đề này không còn tồn tại trong iOS 11.
Có cùng vấn đề. Đối với tôi, nó hoạt động tốt khi tôi thay đổi vị trí từ bên phải của màn hình sang trái. Bất cứ cập nhập nào? –
Trong trường hợp của tôi, Popover sẽ chỉ từ nút phải. Vì vậy, thêm một workaround, vô hiệu hóa hình ảnh động xem trên các bài thuyết trình. bật lại sau khi loại bỏ. nó giải quyết được vấn đề của tôi. – Nookaraju
cùng một vấn đề ở đây. bạn đã vô hiệu hóa hoạt ảnh xem như thế nào? – fabb