SwiftUICam is an AVFoundation based API that allows users to access the camera and its functions in a custom format on their iOS devices in SwiftUI with ease.
It allows users to:
Sections of this API were derived from Awalz/SwiftyCam and KavSoft's tutorial.
This package is downloaded through Swift's Package Manager.
import SwiftUICam
let camera = CameraWrapper()
import SwiftUICam
struct SwiftUICamPreview: UIViewRepresentable {
@ObservedObject var camera: CameraWrapper
var view: UIView
func makeUIView(context: Context) -> UIView {
return camera.makeUIView(view)
}
func updateUIView(_ uiView: UIView, context: Context) { }
}
For more information on how to setup/ use the interface, please reference Sources/SwiftUICam/SampleUsage
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This package is under the MIT license
link |
Stars: 28 |
Last commit: 1 year ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics