'Get rid of shadow form popover view controller (Swift)

I am trying to create number pad in iPad using popover view controller. Everything is achieved but there is a shadow beneath the pop view. I tried to remove that shadow but nothing worked for me. Here is my code which presents pop over view in my view controller.

let vc = self.storyboard?.instantiateViewController(withIdentifier: "PopOverVC") as? PopOverVC
    vc?.modalPresentationStyle = .popover
    vc?.preferredContentSize = CGSize(width: 280, height: 425)
    vc?.delegate = self
    if let popoverPresentationController = vc?.popoverPresentationController {
        popoverPresentationController.permittedArrowDirections = [.down, .up, .right, .left]
        popoverPresentationController.sourceView = self.view
        popoverPresentationController.sourceRect = txtNumber.frame
        popoverPresentationController.delegate = self
        if let popoverController = vc {
            present(popoverController, animated: false, completion: nil)
        }
    }

Here's a screenshot of my pop over view

Can anybody help me removing the shadow? Thanks in advance!!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source