2
私のアプリにUIPopoverView
と表示されています。透明な色にしたいが、ぼかし効果はありません。 popoverPresentationController.backgroundColor = UIColor.clear
を設定すると、色がなくてもぼかし効果があることがわかります。iOSのポップオーバー表示からぼかし効果を削除するにはどうすればよいですか?
どのように私はぼかし効果を削除することができます知っていますか?
ことができます場合は、ここに私のprepareForSegueです:
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier != nil {
if segue.identifier! == "toSetTags" {
if let destination = segue.destination as? SetTagsViewController {
if let controller = destination.popoverPresentationController {
destination.preferredContentSize = CGSize(width: self.view.bounds.width, height: self.view.bounds.height/2)
controller.barButtonItem = self.navigationItem.rightBarButtonItem
controller.backgroundColor = UIColor.clear
controller.permittedArrowDirections = .any
controller.delegate = self
}
}
}
}
}
popoverPresentationControllerは、プロパティcontentViewControllerを持っていません。私はSwift 3を使用しています - おそらく名前が変わったでしょうか? –
popoverPresentationController.presentedViewController.view.alpha = 0の場合、動作しません... IBのPopover View Controllerのビューでアルファを設定するのと同じです。 –