He's trying to be dominant over you. He's saying, this is MY space, and I'M boss here! You might have a tough time with him when you start actually pushing his buttons, since he's got the idea that he could be above you.
I would reprimand him vocally with a low rough voice saying hey or no or something to that effect. As soon as is ears come forward then approach and praise him with a nice voice and good boy. He will catch on quick. It is very important to do this also if he puts his ears back when feeding and do not give him feed until his ears come forward.
I have given treats before, but it is not very often.
I chased him around good tonight when it was time to go in the barn, he shoved his way in and about knocked me down. I chased his butt back out of the barn and around the pasture good until he was ready to ask if he could come in. I think he is trying to push my buttons and test my leadership after tonight for sure now, so he got some proof that I am in fact the boss!! So for now on if ears go back, that's what he is getting! Do horses go thru terrible twos????
My horse has a grumpy ears back attitude and he is almost 8 now. I ignore that and go about my business as if he had his ears pricked up straight. If he becomes aggressive I tell him who's boss, but otherwise I just act like he is acting normal and that seems to work. I think some horses try to intimidate us and gauge our responses because they think they can outsmart us. You have to be a little bit smarter than your horse.
Agree with the others that say nip this in the bud. You seem to be on the right track. When he does it, move his feet away from you until you get a change in attitude. He's testing to see how far he can go and it's these little things that can expand into bigger things if it's not handled.
I do admit though that ear pinning is one of my horsey "pet peeves". So I might be a little more intolerant of it than others.