Perhaps because you saw that he was warming up to you, you inadvertantly changed something about the way you handle him and he has gotten nervous again. Keep in mind that gaining a hedgies trust can be a long road depending on temperament and how they were handled (or in some cases not) before you got them. Just try to be patient with him. Hedgies are naturally shy and its not likely that he is "mad" at you for something you did to him. You are just a new person that he isnt sure of yet.
Like has been previously said you should take him out for at least 30 minutes a day. You may want to break this time down into multiple encounters. Hedgies get upset about being taken out (at least mine still is, but he is really young too and I just got him as well) and if he is taken out repeatedly with nothing bad happening, hopefully it will reinforce to him that you are not "bad" and are not going to hurt him. Also remember not to reinforce "bad" behavior. If he gets cranky don't put him back in his cage right away because he will learn that when he wants to go snuggle up in his cage and sleep he should just be bad and he can go right back in.
I just got a young hedgie and he and i are still getting to know each other too. He doesnt spit at me but he does ball up and puff for awhile. I figured out that if i lay him face down in my palm after i get him out of the cage so that he can smell my hand (instead of on his back), he warms up to me a lot faster. Another thing that totally surprised me and you might want to try is giving him a bath. Damien got incredibly dirty, poo boots and poo quills and even managed to get it on his ears. This was the first week I got him so I was a little nervous about giving him a bath because i thought for sure it would tick him off big time and he would associate me with something bad or mean. But he was disgusting so i did it anyways. The first time was in a sink, Im not sure that "like" is the word I would use to describe the way he felt about it but surprisingly he didnt ball up once or puff at me. he let me clean him and then was supersweet afterwards. He got dirty again yesterday so i took him in the shower with me and when i got him out and in a towel he started exploring my bed and making the sweetest whistling sound. I can't tell you how your hedgie will react to a bath, but I think it is something to consider.