ios 15

After updating to iOS 15, probably you (like me) noticed some strange colors in your customized UINavigationBar. To fix this you need to add some code which works only in iOS 13 and above:

if #available(iOS 13.0, *) {
    let appearance = UINavigationBarAppearance()
    appearance.configureWithOpaqueBackground()
    appearance.backgroundColor = UIColor.green
    navigationBar.standardAppearance = appearance
    navigationBar.scrollEdgeAppearance = navigationBar.standardAppearance
}

If your app supports only iOS 13 and above, of course you can remove #available check.

Sometimes it is good to store form data in session – for example when working with filters, when you want to save last filters state when user gets back to page. But if your form has Entity type in choice field, you will see error like:
“Entity of type XXX passed to the choice field must be managed. Maybe you forget to persist it in the entity manager?”
How to deal with this? Read below.Continue reading