Skip to content

Latest commit

 

History

History
21 lines (18 loc) · 879 Bytes

README.md

File metadata and controls

21 lines (18 loc) · 879 Bytes

codebeat badge

ZoomSwitcherKit

ZoomSwitcher for different iPhone back-camera types (single, dual, triple)

Installation:

  • SPM: .package(url: "https://github.com/eonist/ZoomSwitcherKit.git", .branch("master"))

Examples:

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)")
}

Todo

  • add spm and github actions