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
Quick tip: How to sort array of objects by given property in custom order in Swift?
Imagine this, you have a class and enum like:
1 2 3 4 5 6 7 8 |
class UserDto { public var username: String public var userStatus: UserStatusDto } enum UserStatusDto: String { case ok = "Ok" case error = "Error" } |
and you want to sort users by their status, but users with error first. How to do that? Continue reading
Simple UNNotificationServiceExtension with Firebase Push and image display
As you probably already know, sending push notification from Firebase will not display attached image on device. This example assumes you know how to configure push notifications in your app with Firebase. So let’s start.Continue reading
How to create custom list button in Salesforce and send data to external API?
Ever needed to create your very own custom button in Salesforce? If yes, read below.Continue reading
How to install pcntl PHP extension in Mamp Pro on MacOS Catalina?
Ever wanted to install pnctl extension for Mamp PRO on Catalina in 16 easy steps? If yes, read below.Continue reading
Symfony: How to execute raw SQL which returns objects inside Form
Ever wanted to fetch your entities using complex query from inside you form class? Check out below.Continue reading
IBOutlet becomes nil in viewDidLoad function of your UIViewController?
This is a bit scary for all beginners. You made your pretty view in Interface Builder, attached UIViewController and trying to:
1 2 |
let vc = new MyNewController() self.present(vc, animated: true, completion: nil) |
Internal error when trying to open XIB in XCode 10.3
If you already upgraded XCode to newest 10.3 version, you may notice that opening XIBs created in older versions causes “Internal error” and UI elements are not visible. But there is simple solution for that. Continue reading
How to get all enum values in Swift?
So you made brand new and shiny enum, and want to use it in f.e. picker? To achieve this you need to prepare array of strings which every picker can use. How to do it? Continue reading
Using Swift with Objective-C in framework project
I’m pretty sure there are lot of tutorials about mixing ObjectiveC with Swift in both ways. But most of them are covering only normal projects. If you have framework in which you need to mix both languages, you cannot create simple bridging header because you will hit “using bridging headers with framework targets is unsupported” error. What to do then?Continue reading