Custom Camera View
🕑 Added 2021-02-08 16:50:33 +0000 UTCSource Code For Custom Camera View Using SwiftUI 2.0
(Check out the Updated Source Code!)
Download Source Code πππ
Have a great day !!!
Comments
blabla123
hi, Is there anyway I can change the camera's frame size, so I could have it like the default iOS camera.
winter_lady502
not work
Kavsoft
Camera will not work on simulator Please test with actual device βοΈβοΈβοΈ
Chris Delaney
I encountered the same error that Raymond had: "Thread 1: Simultaneous accesses to 0x13a905980, but modification requires exclusive access." The error occurs on the line "camera.session.startRunning()" in CameraPreview Struct. I am running the app on an iPhone 13 simulator. Any idea on how to fix this?
Kavsoft
Just change the bundle identifier name to your company/personal name Like com.yungi.CameraApp like that Now it will workβοΈβοΈβοΈ
yunqi
Hello, when I use the code, it says Failed to register bundle identifier The app identifier "com.kavsoft.Tests-iOS" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again. What can I do for this
Tyler Harris
I agree with @Stephen Zyszkiwicz's question. How do you keep the view from rotating when going from portrait to landscape?
pramod
Hi is there a way to edit the captured image and save it
Stephen Zyszkiewicz
It seems like the camera flip button appears after I take the photo but nothing happens. Shouldn't the button be available when taking a photo?
Stephen Zyszkiewicz
How do I deal with rotating the device? That is no problem?
Kavsoft
I also encountered that issue it may be a bug or swiftui translation problem thatβs why to avoid I used guard let or if I didnβt implemented that means just use guard let to avoid optional or empty image data
Laurentiu Szabo
Hi. There is a delay in photoOutput function. If you try to save the photo in the first 1-3 seconds after taking the pic, the app will crash.
Kavsoft
I also used it in real Device but no problem came π§π§π§ Msg us through Insta DM
Kavsoft
Whether you build and run this in simulator or in real iPhone????
Raymond Kuan
When i tried this in the tutorial, i got an error. Thread 1: Simultaneous accesses to 0x7fcf1ac0c1f0, but modification requires exclusive access. Do you know how to fix this? Thanks
Kavsoft
Link is not opening!!!