I had a problem where the bottom half of my iPhone froze at times and for hours I couldn't even unlock the iPhone.
I went to the Apple store and they told me when it happens do the unlocking motion and then press the home screen.. They didn't want to replace it there.
My iPhone froze again and this time I got my digital camera and recorded that nothing was working or anything so when I made an Reservation at the Apple store (they told me I had to) I showed them and they took my iPhone and said they will ship me it repaired.
Literally 2 Days later Fedex rings my door bell and its my iPhone and its a brand new one .. Different serials on the back and in software..
Well after reading my story try :
Reseting the phone
do the motion and home screen (if thats the problem your having)
restore if it keeps doing it
If none that works bring it to Apple