From what you said, we can see that you are not really angry because you slapped your boyfriend's ass. You think this is a normal thing. Look at his reaction! If you're not angry, you shouldn't have spanked him this time! If you are still angry, it means that he cares about you hitting him. If you just pat him gently, your boyfriend can't be angry, then you must have hit him hard and hurt him. First of all, do you mean flirting or real fighting? In fact, generally speaking, such behavior is flirting, so it doesn't hurt people.
Although there is no other meaning to say that you hit him just for flirting, in his view, your behavior may have violated his bottom line (self-esteem), so he will be angry. If it's your loving little hand, just pretend to be angry. Men are proud, and they can't be too embarrassed in front of people! Take care of your emotions! Remember, it's true that both sides of life should save face for each other in the future. You'd better not marry such a stingy love rat. If you marry him, you will never be happy with him.
The problem is that you find out if he is really angry. I am really angry. You go and apologize to him, saying that the little girl was wrong and won't offend again. If pretending to be angry causes too much damage, you should be careful if you can't say a word clearly! Don't be disturbed by a person's appearance and family conditions.