我正在使用UIAlertController.但是在iOS 8的iPad上,actionSheet显示了弹出式箭头.任何隐藏箭头的想法?
这是我的代码:
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"this is alert controller" message:@"yeah" preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *cancelAction = [UIAlertAction
actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel action")
style:UIAlertActionStyleCancel
handler:^(UIAlertAction *action)
{
NSLog(@"Cancel action");
}];
UIAlertAction *okAction = [UIAlertAction
actionWithTitle:NSLocalizedString(@"OK", @"OK action")
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action)
{
NSLog(@"OK action");
}];
UIAlertAction *deleteAction = [UIAlertAction
actionWithTitle:NSLocalizedString(@"Delete", @"Delete action")
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction *action) {
NSLog(@"Delete action");
}];
[alertController addAction:cancelAction];
[alertController addAction:okAction];
[alertController addAction:deleteAction];
UIPopoverPresentationController *popover = alertController.popoverPresentationController;
if (popover) {
popover.sourceView = self.view;
popover.sourceRect = self.view.bounds;
popover.permittedArrowDirections = UIPopoverArrowDirectionUnknown;
} …Run Code Online (Sandbox Code Playgroud) uiactionsheet ipad uipopovercontroller ios8 uialertcontroller
我使用新popOverPresentationController呈现UIPopOverController在IOS 8.我设定popOverLayoutMargins与像一个值{65.0,10.0,45.0,10.0} .但是当我呈现popOverController时,这些并没有反映出来.这曾经在iOS 7上完美运行.这在ios 8上是否有效?
此致,Harikant Jammi
在我的应用程序中,我有3个UIPopOvers.当用户点击工具栏中的按钮时,它们会出现.如果弹出窗口已经打开(例如-willAnimateRotationToInterfaceOrientation :),我需要在用户旋转iPad时使弹出框出现在正确的位置.
我该怎么做?
提前致谢!