I want to change the corner radius of Popoverview.
Below is my code.
class PopOverViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewWillLayoutSubviews() {
super.viewDidLayoutSubviews()
self.view.superview?.layer.cornerRadius = 0.0
self.view.superview?.layer.masksToBounds = true
}
}
I am presenting the view controller like below
if let popoverPresentationController = popOverViewController.popoverPresentationController {
popoverPresentationController.permittedArrowDirections = .down
popoverPresentationController.sourceView = tabBar
popoverPresentationController.sourceRect = rect
popoverPresentationController.delegate = self
popoverPresentationController.canOverlapSourceViewRect = false
popOverViewController.preferredContentSize = CGSize(width: 341, height: 68)
self.present(popOverViewController, animated: true, completion: {
})
}
It always shows rounded corners.
Any help is appreciated.