Why is he mad im not giving him my attention?

He ignores me and doesn't give me attention when I do give him attention but gets angry when I don't give him attention? These past days I've been ignoring him and he keeps trying to get my attention. he waves at me and expects me to wave back. I ignore him, so he yells at me in front of people and draw bad attention to me.
Why is he mad im not giving him my attention?
Post Opinion