No one was reported hurt, and officers swarmed the building and had the man contained inside, Lt. Scott Wahl said.
The complex is under the San Diego International Airport's approach path, and landings were halted as a precaution, Federal Aviation Administration spokesman Ian Gregor said. Departures were still being allowed.
Officers responding to a domestic violence call heard gunshots shortly after 9 am at the complex in an upscale neighborhood near Little Italy, Wahl said.
"He's shooting in all different directions," Wahl said. "But we have him contained inside the building."
Federal Aviation Administration spokesman Ian Gregor said the complex is under the airport's approach path and so planes were not being allowed to land, though the airport was allowing departures.