The Iowa legislature drafts law, which if passed by that body and signed by the governor, then become state law. Occasionally, the legislature will pass a law and in the course of a prosecution or other litigation, it will be declared unconstitutional by a court.
The effect of that ruling can vary greatly, but it typically means that at least one section of a law has been found to violate the Constitution of Iowa or the United States and that section becomes unenforceable.
This ruling, however, does not amend the statute or remove it from the Iowa Code. The court does not have that power. Only the legislature can change or amend the text of the statute. But what happens if a court finds it unconstitutional and then the legislature does nothing?
In the case of a man in Calhoun County who was protesting the construction of a pipeline across his land, it still led to criminal charges. He had hung an American flag upside down and was charged with flag desecration. Iowa has a statute on the books that makes this conduct criminal, but it had been ruled unconstitutional in 2014 by a federal court.
The U.S. Supreme Court has ruled that these statutes violate the First Amendment's right of free speech, as most incidents involving the flag, are made as part of a political protest.
Laws found to be unconstitutional are usually flagged by legal information providers as being such, so it is unclear why the man would have been charged with a criminal violation of that statute.
The county attorney later filed a motion to dismiss the charge and the judge in the case quickly approved the motion. She also encouraged the legislature to formally act to repeal the statute in compliance with the Constitution.