相关疑难解决方法(0)

在iOS8中更改操作表弹出箭头

我正在使用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

21
推荐指数
3
解决办法
2万
查看次数

iOS 8 popoverpresentationcontroller popoverlayoutmargin无效

我使用新popOverPresentationController呈现UIPopOverController在IOS 8.我设定popOverLayoutMargins与像一个值{65.0,10.0,45.0,10.0} .但是当我呈现popOverController时,这些并没有反映出来.这曾经在iOS 7上完美运行.这在ios 8上是否有效?

此致,Harikant Jammi

ios

19
推荐指数
1
解决办法
2502
查看次数

UIPopOver和方向更改

在我的应用程序中,我有3个UIPopOvers.当用户点击工具栏中的按钮时,它们会出现.如果弹出窗口已经打开(例如-willAnimateRotationToInterfaceOrientation :),我需要在用户旋转iPad时使弹出框出现在正确的位置.

我该怎么做?

提前致谢!

ipad uipopovercontroller

10
推荐指数
2
解决办法
9358
查看次数