Using DispatchSemaphore to control async execution

I’ve been debugging the upcoming OPML Import functionality of NewsWave and this bug was driving me nuts:  in some cases and for no apparent reason URLSessions would fail without a callback.  At first the bug seemed random, but after a bit of testing I realized the more feeds I tried to import, the more likely the bug …

Opening links in Safari / Embedded Safari – iOS

In iOS you can either do it with a push: let safariVC = SFSafariViewController(url: URL(string: “www.google.com”)!, configuration: .init())   present(safariVC, animated: true, completion: nil)   or directly in the Safari app: UIApplication.shared.open(URL(string:“www.google.com”)!, options: [:]) { (_) in }   Very practical,    Marc

Reloading/inserting Dynamic Height cells and keeping Scroll position

For an upcoming app I had to insert Dynamic Height cells while keeping the tableView offset -scrolling position- constant. This would typically be a trivial issue, but given that when using Dynamic Height cells nor the contentSize nor the offset can be trusted it’s a bit more tricky than it seems… What I was trying …