The popover that I display is now bad displayed. There is a line missing on the arrow side. We can check that there is a little piece of black just at the end of the arrow. I think there is a view inside that is too long.
Code to display the popover:
_popoverController = UIPopoverController(contentViewController: navController)
_popoverController?.delegate = self
let rect = slotCollectionView.cellForItem(at: indexPath)!.frame
self._popoverController?.backgroundColor = UIColor.init(rgb: Int(quaternaryColorHexa))
self._popoverController?.present (from: rect, in: self.slotCollectionView, permittedArrowDirections: UIPopoverArrowDirection.any, animated: true)
Code to init Popover:
override func viewDidLoad()
{
super.viewDidLoad()
self.preferredContentSize = contentSize()
self.navigationController!.preferredContentSize = self.preferredContentSize;
peopleTableView.isScrollEnabled = true
peopleTableView.bounces = true
peopleTableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: 0, height: 0))
peopleTableView.tableFooterView?.isHidden = true
peopleTableView.backgroundColor = UIColor.init(rgb: Int(quinquenaryColorHexa))
self.view.backgroundColor = UIColor.init(rgb: Int(quinquenaryColorHexa))
self.view.layer.cornerRadius = 13.0
self.view.layer.borderWidth = 1.5
self.view.layer.borderColor = UIColor.init(rgb: Int(quaternaryColorHexa)).cgColor
iOS12 display:
iOS13 display:
Add a new file to the project, Select File -> New ->File and then select iOS -> Source -> Cocoa Touch Class. Name it PopoverViewController and make it a subclass of UIViewController. Go back to Main. storyboard and select the added View Controller.
Typically, a popover includes an arrow pointing to the location from which it emerged. In this tutorial a popover is displayed containing a text view. This tutorial is made with Xcode 10 and built for iOS 12.
When Apple released iOS 13 in 2019 — to ample fanfare — the euphoria was intense but short-lived, as the software suffered from a host of problems and stability issues. Numerous bugs plagued the initial release — so many that Apple quickly released a beta upgrade to iOS 13.1 a week ahead of schedule to tackle the worst problems.
While there’s no specific fix for what ails iOS 13.6, you can boost performance by doing the following to enhance battery life and prevent app problems: Open Settings. Navigate to the General section.
While iOS 13.7 doesn’t have any security patches, if you skipped iOS 13.6 or are still using an older version of iOS, you’ll get all the security patches previously released with this upgrade. A few problems are still being reported, including issues with downloading and installing the update.
As mentioned in this answer it is a new feature of iOS 13 that UIPopovers include the arrows in their content views. You should use the safe area to properly react to this change.
I think it is an iOS bug in the iOS13 version, and I advice you to do your own popover by using that git project:
DDPopoverBackgroundView
and using this for displaying the popover:
// Popover
_popoverController = UIPopoverController(contentViewController: navController)
_popoverController?.delegate = self
let rect = slotCollectionView.cellForItem(at: indexPath)!.frame
self._popoverController!.contentSize = CGSize(width: 350, height: 600)
self._popoverController!.backgroundViewClass = DDPopoverBackgroundView.self
self._popoverController!.backgroundColor = UIColor.init(rgb: Int(quaternaryColorHexa)) //arrow color
OperationQueue.main.addOperation({
self._popoverController?.present(from: rect, in: self.slotCollectionView, permittedArrowDirections: UIPopoverArrowDirection.any, animated: true)
})
enjoy ! ;-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With