Write an article based on this summary:

Open your iPhone's Settings. Scroll down and tap General. Scroll down and tap Reset. Tap Erase All Content and Settings. Type in your iPhone's passcode. Tap Erase iPhone twice. Wait for your iPhone to finish erasing. Press your iPhone's Home button. Complete your iPhone's initial setup steps. Tap Restore from iCloud Backup when prompted. Wait for your iPhone to finish restoring.

Article:
This app is grey with gears on it. You'll likely find it on the Home Screen. Before erasing and restoring with iCloud, you may want to make sure you have an iCloud backup first. To do so, tap the name card at the top of the "Settings" page, tap iCloud, and scroll down and tap iCloud Backup. If you see a backup date at the bottom of the screen, you're good to go. It's near the bottom of your iPhone's screen, so you shouldn't have to scroll very far down. If you checked to make sure you have a backup available, first tap the "Back" button in the top-left corner of the screen. You'll find this option at the bottom of the "General" page. It's an option near the top of the page. This option isn't as scary as it sounds -- you'll be restoring a backup immediately after erasing your iPhone. If you don't have a passcode, skip this step. It's at the bottom of the screen. Once it does, you'll be able to select an iCloud backup. If you don't have an iCloud backup, you'll need to restore using iTunes instead. It's the circular button below the iPhone's screen. This will include selecting a language and region, and choosing a Wi-Fi network to connect to. Doing so will allow you to select and install a backup from your iCloud account. Once it does, you'll be able to unlock your phone, open the Photos app, and view your previously deleted photos.