B.S*_*.S. 10 ios8 uialertcontroller
我有UIToolBar一些按钮.我目前UIAlertController使用UIAlertControllerStyleActionSheet该按钮的演讲风格.它显示正确,但是当我旋转设备时,此操作表有错误的位置.
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction* destructive = [UIAlertAction actionWithTitle:destructiveTitle style:UIAlertActionStyleDestructive handler:someHandler];
[alertController addAction:destructive];
[alertController setModalPresentationStyle:UIModalPresentationPopover];
alertController.modalInPopover = YES;
alertController.popoverPresentationController.barButtonItem = barButton;
alertController.popoverPresentationController.permittedArrowDirections = UIPopoverArrowDirectionAny;
alertController.popoverPresentationController.delegate = self;
[self presentViewController:alertController animated:YES completion:nil];
Run Code Online (Sandbox Code Playgroud)
还有一两件事在这里,popoverPresentationController:willRepositionPopoverToRect从UIPopoverPresentationControllerDelegate没有叫我时,旋转装置.
这里出了什么问题,有什么建议吗?
提前致谢!
| 归档时间: |
|
| 查看次数: |
3434 次 |
| 最近记录: |