Iphone 4 stuck on black screen with loading wheel?

My iphone is stuck on the black loading screen with a wheel. I have never jailbroken my phone, and I was just texting when it randomly started doing this. I tried restarting (home & power button) but that didn't work. Same thing kept happening. I'm about to factory restore, will that work? Is there something better I should do?

Try holding the power button for a few more seconds than you would normally, this may force a system restart.

Alternatively you could try to plug in a charger to see if that kickstarts it back to life.

I'm no expert when it comes to Apple, but do try this to see if it helps.

How can you do a factory restore if the phone is stuck on the loading screen?

Maybe you drained the battery completely. I say that coz it happens to my iPod too. Charge it & if its still not comin then take it 2 the factory.