Search code examples
iosswiftcocoa-touchuiimagepickercontrollersnapchat

Custom camera in iOS like Snapchat


How does Snapchat make a custom UI for the camera, and how do they put a blur over it? I tried to accomplish the blur by putting a BlurView on top of the ImageView that I make into the camera with UIImagePicker, in

override func viewWillAppear(bool {
super.viewWillAppear(true)
'UIImagePicker logic'
}

But the imagepicker is not working until I remove the BlurView from the super view

CustomUI Blur


Solution

  • UIImagePicker will not work in this situation. Have to use AVFoundation and CALayer. This allows me to make a custom camera with a custom UI, and custom functionality. See this tutorial for basic introduction