I try my darndest to ignore the fans, although it's not easy. And sometimes, to be honest, they can be genuinely funny. In 9 years of officiating basketball, I've only made a couple comments to fans.
However, I also officiate lacrosse; and lax is an entirely different animal from basketball. The game is different, the attitudes of the players are different, and the attitudes of the officials are also very different.
Anyway, my favorite fan interaction came while I was reffing a youth lax game. The parents stand right on the sideline and there was one particular mom who was yelling the whole game. And she knew absolutely nothing. Her poor husband was so embarrassed, but obviously would get in deep trouble if he told her to shut up. At one point during a play that occurred in the opposite half of the field from her, she yells "He was in the crease!!" I slowly backed up and without looking at her said simply, "That's really amazing that you can see his big toe from 75 yards away!" then continued to my new position. Her husband then did get her to quiet down a little.
A couple weeks later, I'm back at the same field, and sure enough, the same mom is there. Ball rolls OOB right in front of her and she yells "That's blue!! That's blue!!"
I announce loudly "White", then softer "Nice to see you again". Then blew the whistle and I was on my way.
Maybe you had to be there, but it was a very funny moment for me. I don't think she really likes me very much.
Chuck