If your iPhone's power button has stopped working, you don't need to drain the battery to turn the device off. Ifr your iPhone is running iOS 5 or above, you can use an accessibility feature called Assistive Touch. When Assistive Touch is enabled, you can turn off your iPhone completely through the touch screen. This enables you to save battery power and protect important data, such as business documents, until you get the phone repaired.
Tap "Settings" on the home screen, and then tap "General."
Video of the Day
Scroll down and touch "Accessibility."
Tap "Assistive Touch" under Physical & Motor.
Tap the button next to "Assistive Touch" to turn the feature on. Go back to the home screen.
Tap the white dot on the home screen to open the Assistive Touch menu.
Tap "Device," and then tap and hold "Lock Screen." The "Power Off" slider appears.
Swipe your finger across the slider to turn off the phone.