Why does he act so disinterested?

So there's a guy who's constantly stared at me and smiled for some months last year. Then he started ignoring me and one day I approached him and he was very very nervous. I approached him a couple more times in June but still he wasn't comfortable around me. Untill September we haven't seen each other. In the beginning of this school year he tried to get my attention by walking past me more often. Then he ignored me again. One day his friend asked me to approach him one more time. I did and he smiled a lot. Next thing I saw him in a classroom (I was outside and he was sitting next to the window) and he waved at me. One time when our lessons finished he and his friend approached me when I was sitting on a bench. However, his friend did all the talking and the guy was standing behind me so I couldn't look at him. Once I even saw him taking pictures of me with his phone. Last week we added each other on Facebook and he poked me. My friend texted him saying I like him. He responded "really me.. but there are many other good looking guys xD" (by that he meant why have I chosen him particularly). He even complained that I'm constantly poking him instead of texting him. So I texted him yesterday and it went pretty bad. First he didn't want to admit he poked me first (he did admit it later though) and then he just straight up asked me why do I stare at him. Again he didn't want to admit he started the staring thing (he did 100%). Then he left the chat for 20 minutes without saying anything. I thought we should start over so I asked him something nice. He asked me back the same, I gave him a long answer and he replyed with just "interesting". I got angry and stopped texting him.
Why do you think he acts like this? When he was talking to my friend they talked for 1h and a half continuously. I was really just trying to be nice with him because he used to be very nervous around me and blush.
Why does he act so disinterested?
Post Opinion