Post

Replies

Boosts

Views

Activity

Reply to UISplitViewController on Compact Width leaks first DetailViewController
Thanks for the Answer. I can see now in which case this is necessary - when changing from Regular Width to Compact and then back to Regular when there is no Detail Pushed while in Compact. However, the details of this are surprising to me. It seems like it saves the Detail ViewController at the first time the Master is show. I would have expected it to e.g. keep the last Detail ViewController as fallback. Anyway, I will make sure to cleanup everything in viewWillDisappear.
Jun ’20
Reply to NSManagedObjectContext perform is only available in iOS 15 or newer
The problem was, that I was doing everything, including the context.perform in one big do / catch block do { ... context.perform({ let results = try context.fetch(request) }) ... } catch { ... } The new extension method for perform is now marked as rethrows whereas the old one was not, so the fact there was a throwing method in the perform block meant the compiler selected the rethrowing perform which is only available on iOS >= 15. @Cy-4AH on Stackoverflow suggested to use try? instead of try which works because the error is caught right there, not forcing the rethrowing method to be used. Another solution is to move the do/catch inside the perform: context.perform({ do { let results = try context.fetch(request) } catch { ... } })
Jan ’22