If iPhone is showing a black screen when you open the Camera, the issue is most likely software related and it can be fixed using troubleshooting steps as provided below
iPhone Camera Black Screen Problem
Just like any other device, the Camera on iPhone can sometimes malfunction, fail to load or even get stuck.
When this happens, the iPhone camera is known to momentarily present a black screen, instead of showing a clear view through the front/rear camera.
As mentioned above, this problem in most cases is related to a software issue and is not due to a problem with the lenses or the camera itself.
1. Check iPhone Case & Camera Lens
If you are using a Case to protect iPhone, make sure that the protective Case is not blocking the front Camera on your device.
Also, take a good look at the Camera Lens and make sure that the lens is not covered by dust or grime.
2. Close the Camera App
If the Camera is showing Black screen, simply close the Camera App by swiping-up from bottom of the screen or by pressing the power button (in case of iPhone with Home Button).
3. Switch from Front to Rear Camera
Another way to recover the Camera App from a software related glitch is to switch from Front to Rear Camera for a short period of time.
Tap on the Switcher Icon to switch from Front to Rear Camera > Wait for 10 seconds and tap on the Switcher Icon again to return back to the Front Camera.
4. Turn ON/OFF Flashlight
The front LED light on iPhone is used by both Camera and the Flashlight. In certain cases, the problem is due to the Flashlight not working or not being synchronized with the Camera App.
Open the Control Center on your iPhone and tap on the Flashlight icon to switch ON the Flashlight.
After a while, open the Control Center again and tap on the Flashlight icon to close the Flashlight.
5. Switch OFF Voice-Over Feature
Make sure that the VoiceOver feature on your iPhone has not been accidentally switched ON.
Go to Settings > Accessibility > VoiceOver and move the toggle next to VoiceOver to OFF position.
Now, try to access the Camera on your iPhone and you should find it working properly.
6. Restart iPhone
Stuck Apps and processes can interfere with proper functioning of the Camera App.
Go to Settings > General > scroll down and tap on Shut Down.
This will bring up the Slide-to-Power OFF screen, use the Slider to Power OFF iPhone.
Allow iPhone to completely Shut Down > Wait for 30 seconds > Restart iPhone and see if the Camera is now working.
7. Install Updates
Make sure that your device is up to date with the latest Software Updates.
Go to Settings > General > tap on Software Update.
On the next screen, tap on Download and Install (in case an Update is available) and follow the instructions to install the updates.
8. Reset All Settings
If above methods did not help, you can try to Reset All Settings on your device to Factory Default Settings and see if this helps in fixing the problem.
Go to Settings > General > Transfer or Reset iPhone > Reset > On the pop-up, select Reset All Settings option.
This step will not erase any data from your iPhone, but it will erase your WiFi Network Password and disconnect your device from from internet.
After iPhone restarts, you will be required to join WiFi Network by entering your WiFi Network Password.