how to deal with my boyfriend moodswings

I told my boyfriend I was pregnant and he's still being moody. Before I told him he was always mad and some days he didn't wanna be bothered and there were days he missed me. When I told him I was pregnant he said he already knew. How common are guy mood swings?