Before any attempt was made to enforce such a law, the federal district court for the district of Iowa would have issued an injunction banning such enforcement; then, any Iowa official who attempted to enforce it would be in contempt of federal court, and would suffer the consequences.
For more, google “Wallace school-house door” or “Ross Barnett Ol’ Miss.”
You’re welcome.