Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Swift POPOPOR错误阴影,如果宽度<;30_Ios_Xcode_Swift_Cocoa Touch_Popover - Fatal编程技术网

Ios Swift POPOPOR错误阴影,如果宽度<;30

Ios Swift POPOPOR错误阴影,如果宽度<;30,ios,xcode,swift,cocoa-touch,popover,Ios,Xcode,Swift,Cocoa Touch,Popover,这是主控制器,它是故事板上的一个简单的popover序列。问题是如果我将宽度设置为低于50,就会出现奇怪的阴影 class MainViewController: UIViewController, UIPopoverPresentationControllerDelegate { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typica

这是主控制器,它是故事板上的一个简单的popover序列。问题是如果我将宽度设置为低于50,就会出现奇怪的阴影

class MainViewController: UIViewController, UIPopoverPresentationControllerDelegate
{
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.

}

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?)
{
if let popupView = segue.destinationViewController as? UIViewController
{
  if let popup = popupView.popoverPresentationController
  {
    popup.delegate = self
           popupView.preferredContentSize = CGSize(width: 30, height: 250)
          }
}
    }

func adaptivePresentationStyleForPresentationController(controller:      UIPresentationController) -> UIModalPresentationStyle
{
return UIModalPresentationStyle.None
}

}