iPhone Wi-Fi could not connect I was just using my iPhone when it suddenly disconnected from Wifi. I went into the Settings app, I tapped on "Wi-Fi" and it froze there (only the app was frozen, I could still close it). So I closed it and tried several times until finally I went into the Wi-Fi setting. It was searching for connections but it just kept searching and didn't even show up my wifi connection. I tried resetting it by holding down the sleep button (the one used to lock/unlock iPhones) and home button simultaneously but it didn't work. I've also tried normal restart by first shutting it down and let it boot up again, problem is still there. 

I have restored my iPhone twice from my backup, and restored to factory settings and restored from backup, still the stubborn problem is there.

Sometimes it got worse till the whole iOS froze up for about 10+ seconds. Other apps work perfectly fine. Other settings in Settings app are currently accessible. 

Running on iOS 7.1.1.
There are a lot of possible things here that could cause your problem. 

1)The Wi-Fi receiver on your iPhone could be faulty. You will have to take it to an Apple Store to get that fixed. 

2)Your modem might have connection problems. Try pulling out the power cord and wait 5 minutes. While you're waiting, make sure all the cables are fit into the modem and not loose and hanging out.