How to Add Custom Popovers to Your iOS App
<p>There are currently 3 ways to present popovers. One is with <code>UIPopoverPresentationController</code> , but that only works on iPad. You could also present a <code>UIMenu</code> , but that’s only for iOS 14+. Finally, you could use <code>UIAlertController</code>. This is probably the easiest to implement — but also the most limiting, since it supports only labels, buttons, and text fields.</p>
<p>So… what if you need an in-app notification? A picture-in-picture video? Or an onboarding popup? This is where <em>custom</em> popovers come in.</p>
<p><img alt="" src="https://miro.medium.com/v2/resize:fit:700/1*qKjR2QfNmx0bkMXsrXdoRw.png" style="height:420px; width:700px" /></p>
<p>We’ll be using the <a href="https://github.com/aheze/Popovers" rel="noopener ugc nofollow" target="_blank">Popovers</a> library. Full disclosure: I’m the developer of this. But it’s 100% open source and under the <a href="https://github.com/aheze/Popovers/blob/main/LICENSE" rel="noopener ugc nofollow" target="_blank">MIT license</a>, so feel free to use it however you want.</p>
<p><a href="https://betterprogramming.pub/how-to-add-custom-popovers-to-your-swiftui-ios-app-814bdfad73d0"><strong>Read More</strong></a></p>