Description | |
---|---|
Records video | π₯ |
takes photos | π· |
Flash on/off | β‘ |
Front / Back camera | |
Hold to record video | β |
Tap to take photo | π |
Tap to focus / set exposure | π |
Pinch to zoom | π |
Looping video/photo preview | π |
Share button | π |
Programatic UI | π€ |
Doesn't stop Spotify | πΆ |
Stores files in temporary | πΎ |
Throw oriented code | π£ |
Persistent app authorisation | π« |
Animated record button | π΄ |
Callback based | π |
- High codebeat GPA
- Low class scoped variable count (In order to better handle overall state)
- Setup errors can be handled from the POV of the initiator
- Operation errors is handled in the onCapture completion block
- Callback based (as oppose to delegate based) More info
- Easily styleable (The camera view is separate from the UI view)
- No third-party libraries or Sugar
- Entirely programatic (No storyboard)
- Thoroughly documented (Artifacts and sideEffects etc)
- Uses Sindre-lint style guide
- Small footprint, only ~750 LOC (Lines of code)
- In order to keep things simple, The UI is CGRect based. Use your own Autolayout distro like SnapKit etc when adding additional UI
- SPM:
.package(url: "https://github.com/eonist/HybridCamera.git", .branch("master"))
- Manual: Open
HybridCamera.xcodeproj
IMPORTANT: Make sure info.plist has these variables
Privacy - Microphone Usage Description
Privacy - Camera Usage Description
Privacy - Photo Library Additions Usage Description
self.view = HybridCamView()
view.camView.onPhotoCaptureComplete = { (image: UIImage?, url: URL?, error: Error?) in
Swift.print("On photo capture complete \(url)")
}
hybridCamView.camView.onVideoCaptureComplete = { (url: URL?, error: Error?) in
Swift.print("On Video capture complete \(url)")
}
- Add support for more orientation modes (Currently only supports portrait)
- Add support for error resolution from the POV of initiating the camera
- Make UI with AutoLayout π
- Make lib carthage support β
- Fix AudioBug β
- Fix FontCamera bug w/ IphoneX β
- Add Spatial, Chaplin as an option to HybridCam π
- Add CI-Travis π