ZoomSwitcher for different iPhone back-camera types (single, dual, triple)
- SPM:
.package(url: "https://github.com/eonist/ZoomSwitcherKit.git", .branch("master"))
let backCamType: BackCameraType = .backCameraType
let size = ZoomSwitcher.getSize(backCamType: backCamType)
let zoomSwitcher: ZoomSwitcher = .init(frame: .init(origin: .zero, size: size), backCameraType: backCamType) zoomSwitcher.anchorAndSize(to: self, size: size)
zoomSwitcher.buttons[backCamType.defaultLenseIndex].toggle = true
addSubview(zoomSwitcher)
zoomSwitcher.onSwitch = { focalType in
Swift.print("Switched to focalType: \(focalType)")
}
- add spm and github actions