这是主控制器,它是一个简单的故事板弹出窗口。问题是如果我将宽度设置为低于50,则会出现奇怪的阴影。 https://www.dropbox.com/s/bboh6cxnrge6q9g/Screen%20Shot%202015-09-04%20at%202.20.03%20PM.png?dl=0
https://www.dropbox.com/s/lrw3ec44m0997q4/Screen%20Shot%202015-09-04%20at%202.20.56%20PM.png?dl=0
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
}
}