I recently had a need for an app that displayed a fullscreen camera preview on an iPhone without any UI whatsoever. This is the result of 30 minutes of cobbling together various SO answers, blog posts etc.
All you need to do to use this is:
- Create a new "Single view" poject
- Add a new
UIView
to theViewController
in the Storyboard - Connect the outlet
previewView
to theUIView
- Add the entries below to
Info.plist
<key>NSMicrophoneUsageDescription</key>
<string>This app does not require access to the microphone.</string>
<key>NSCameraUsageDescription</key>
<string>This app requires access to the camera.</string>