Easy button answer:
Just put 10,000 volt electrified fences around inner cities so that the guns from non-inner cities don’t find their way into the inner cities to do what they do, and that is, tempt all those future brain surgeons and rocket scientists in inner cities to commit violent crimes.
What’s that you say? It will essentially turn inner cities into what are seemingly prisons?
Oh well, it’s not as if many of those residents don’t wind up in prison anyway.