...but rather it was the courts that declared it unconstitutional so he was just doing what the court had ordered. The problem is that this is a big fat LIE.
Granted, there was a case that had just started thru the court system but it hadn't even had a single hearing yet. There was no way of knowing how and even when the court was going to rule, and no matter how that first court would have ruled, it could have been years before it would have made it to the Supreme Court where it could actually have been declared unconstitutional or not. In fact, the consensus seemed to be that most people were willing to wait and see what the court might eventually have to say on the issue, but Trump shocked everyone by just issuing an executive order shutting down DACA without any review or advice from anyone. He's the one who threw the wrench into the works and he now needs to take full responsibility in helping to fix it.