Ok guys I've solved the problem. I was pretty new to autolayout so it was very frustrating trying to learn it by trial and error.
I solved it by reading this awesome autolayout Xcode 5 tutorial and adding the necessary constraints.
If anyone else is having problems with constraints I can't reccomend the tutorial enough.